Question
Write a program that prompts the user to enter three numbersand then prints them vertically (each on one line), first forwardand then reversed (the last one first), as shown in the followingdesign. Please enter three numbers: 15 35 72 Your numbers forward: 15 35 72 Your numbers reversed: 72 35 15 Write a program that prompts the user to enter three numbersand then prints them vertically (each on one line), first forwardand then reversed (the last one first), as shown in the followingdesign. Please enter three numbers: 15 35 72 Your numbers forward: 15 35 72 Your numbers reversed: 72 35 15
Explanation / Answer
please rate - thanks #include #include int main() {int n1,n2,n3; printf("Please enter three numbers: "); scanf("%d %d %d",&n1,&n2,&n3); printf("Your numbers forward: %5d %5d %5d ",n1,n2,n3); printf("Your numbers reversed: %5d %5d %5d ",n3,n2,n1); getch(); return 0; }