# multiplication table in miracle c

I have to  Write the pseudo code and the C source code for the following:

Write a multiplication table of users choice in descending order.

1. Prompt the user to enter number

2. Display the multiplication table using for loop

Example:  If user enters number 5

Your display should like this:

User requested to show the 5 times multiplication table:

5 times multiplication table is:

5  x   20  =  100

5   x  19  =   95

&..

5  x  1   =     5

How would I do this in miracle c
ozo

membership
Create an account to see this answer
Signing up is free. No credit card required.
n_i_c_o

Hi,
here is what you need:

pseudo code:

- save user input into variable num
- for i from 20 to 0 in -1 increment do

miracle C code:

#include <stdio.h>

int main(int, char**)
{
int num,i;
printf("Enter number:");
fscanf(stdin, "%d", &num);

for (i = 20; i > 0; i--)
printf("%d x %d = %d\n", i, num, i*num);

getchar();
return 0;
}
Hi,
here is what you need:

pseudo code:

- save user input into variable num
- for i from 20 to 0 in -1 increment do
- print i, num, i*num
- end for

miracle C code:

#include <stdio.h>

int main(int, char**)
{
int num,i;
printf("Enter number:");
fscanf(stdin, "%d", &num);

for (i = 20; i > 0; i--)
printf("%d x %d = %d\n", i, num, i*num);

getchar();
return 0;
}
n_i_c_o, you shouldn't post complete source code for an assignment. Instead you should help the asker solve the problem himself. Not only is that in the rules of this site, it's also the best way to teach something like this.
I am new to the site. Will read the rules more carefully.
Regards,
N.
That's ok, n_i_c_o. I was merely pointing it out ;)
rmrivera67, did you get the help you wanted ? You don't have to accept an answer if you didn't.