14 lines
267 B
C
14 lines
267 B
C
#include <stdio.h>
|
|
|
|
int main() {
|
|
int a, b, n, count=0;
|
|
printf("Please input a, b, n: ");
|
|
scanf("%d %d %d", &a, &b, &n);
|
|
for (;n>0;n--) {
|
|
count += a*b;
|
|
a--;
|
|
b--;
|
|
}
|
|
printf("The total number is %d", count);
|
|
return 0;
|
|
} |