Write a C program (a pseudo code) that will generate a 5 X 5 multiplication tabl
ID: 3550895 • Letter: W
Question
Write a C program (a pseudo code) that will generate a 5 X 5 multiplication table starting with the number of the users choice.The program should operate within a loop that will run until the user indicates that they no longer wish to enter any more numbers.
A. Example: If the user enters 4 the program will print:
Write a C program (a pseudo code) that will generate a 5 times 5 multiplication table starting with the number of the users choice.The program should operate within a loop that will run until the user indicates that they no longer wish to enter any more numbers. Example: If the user enters 4 the program will print:Explanation / Answer
#include<stdio.h>
int main()
{
int n,ch,i,j;;
while(1)
{
printf("Enter a number : ");
scanf("%d",&n);
printf(" ");
for(i=n;i<n+5;i++)
{
for(j=n;j<n+5;j++)
printf("%d ",i*j);
printf(" ");
}
printf("Want to continue..... ..Press 1 to continue.. 2 to exit..");
scanf("%d",&ch);
printf(" ");
if(ch==2)
break;
}
return 0;
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.