C practice problem Write an array named digits in the format

C++ practice problem.

Write an array named digits in the format of \"int\". The size of digits should be 9 in this case. Array digits should contain 9 integer numbers from 1 to 9 by initialization. In the main function, please use serval loops and the pointer notations of digits to plot the integer pyramid below:

Solution

#include #include void main() { int i,n,j; clrscr(); printf(\"\ Please Give The Value of N: \"); scanf(\"%d\",&n); for(i=1;i=1;j--) printf(\" %d\",j); for(j=1;j<=i;j++) printf(\" %d\",j); printf(\"\ \"); } getch(); }
C++ practice problem. Write an array named digits in the format of \

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site