im trying to write a program that prompts the user to enter three numbers and then prints them vertically (each on one line), first forward and then reversed. this is how the design should look:
please enter three numbers: 1 43 54
your numbers fowards:
1
43
54
your numbers backwards:
54
43
1
this is what i have thus far when it comes to code....
can someone tell me where i am going wrong and what i need o do to fix it? Thanks!
please enter three numbers: 1 43 54
your numbers fowards:
1
43
54
your numbers backwards:
54
43
1
this is what i have thus far when it comes to code....
Code:
#include <stdio>
int main (void)
{
// local declarations
int a;
int b;
int c;
//statments
printf ("\nwelcome, this program outputs stuff you input\n");
printf ("Enter three numbers");
printf ("in the form: nnn nnn nnn <return>\n");
scanf ("%d %d %d", &a, &b, &c);
printf ("these are your numbers forward");
printf ("inta\v intb\v intc\n")
printf ("these are your numbers backwards");
printf ("intc\v intb\v intc\n");
return 0;
}
can someone tell me where i am going wrong and what i need o do to fix it? Thanks!
Comment