⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 multiply.c

📁 c21Examples.rar
💻 C
字号:
/* Program to calculate the product of two numbers. */
#include <stdio.h>

int val1, val2, val3;

int product(int x, int y);

int main( void )
{
   /* Get the first number */
   printf("Enter a number between 1 and 100: ");
   scanf("%d", &val1);

   /* Get the second number */
   printf("Enter another number between 1 and 100: ");
   scanf("%d", &val2);

   /* Calculate and display the product */
   val3 = product(val1, val2);
   printf ("%d times %d = %d\n", val1, val2, val3);

   return 0;
}

/* Function returns the product of the two values provided */
int product(int x, int y)
{
    return (x * y);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -