Answer to Question #300944 in C for Nobody

Question #300944

Create a program based on the sample output using while loop.


Enter a Number : 10


1*2 = 2

2*4 = 8

3*6 = 18

4*8 = 32

5*10 = 50



1
Expert's answer
2022-02-22T08:26:12-0500
#include <stdio.h>

int main()
{
    int number, item, mult;
    
    printf("Enter a Number: ");
    scanf("%d", &number);
    printf("\n");
    item = 1;
    while(item <= (number / 2))
    {
        mult = item * (item * 2);
        printf("%d*%d = %d\n", item, (item * 2), mult);
        item += 1;
    }
}

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

Nobody
22.02.22, 15:38

Thank youuuuuu!!!!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS