Answer to Question #300367 in C for Nobody

Question #300367

Print 1 to 10 and multiply it to 1 to 20 even numbers using while loop in c.


Sample Output :

1 * 2 = 2

2 * 4 = 8

3 * 6 = 18

4 * 8 = 32

5 * 10 = 50

6 * 12 = 72

7 * 14 = 98

8 * 16 = 128

9 * 18 = 162

10 * 20 = 200


1
Expert's answer
2022-02-20T14:40:07-0500
#include <stdio.h>

int main() {
    int x = 1;
    int y = 2;
    while(x <= 10) {
        printf("%d * %d = %d\n", x, y, x*y);
        x = x + 1;
        y = y + 2;
    }
    return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS