Click here to Skip to main content
15,902,114 members

Comments by Imaginary Toast (Top 4 by date)

Imaginary Toast 6-May-21 10:39am View    
Thanks
Imaginary Toast 6-May-21 10:32am View    
Sure, I'll tell you. So, this code basically sets up a multiplication table, with answer, like you enter 3, it writes 3 x 1 = answer, 3 x 2 = answer, 3 x 14 = answer, and so on.
Imaginary Toast 6-May-21 10:15am View    
Oh that's where my problem is. Thanks.

Is this better?

#include <stdio.h>
int main() {
int n, i;
printf("Enter an integer: ");
scanf("%d", &n);
for (i = 1; i <= 10; ++i) {
printf("%d * %d = %d \n", n, i, n * i);
}
return 0;
}
Imaginary Toast 6-May-21 10:15am View    
Deleted
Oh that's where my problem is. Thanks.

Is this better?

#include <stdio.h>
int main() {
int n, i;
printf("Enter an integer: ");
scanf("%d", &n);
for (i = 1; i <= 10; ++i) {
printf("%d * %d = %d \n", n, i, n * i);
}
return 0;
}