Here is the simple program for printing reverse number pattern using For Loop in C++.
#include<iostream> using namespace std; int main() { int i,j,a; cout<<"\nEnter the value:"; cin>>a; for(i=1;i<=a;i++) { cout<<"\n"; for(j=i;j>0;j--) { cout<<j; } } return 0; }To download raw file Click Here
Enter the value:10 1 21 321 4321 54321 654321 7654321 87654321 987654321 10987654321
#include<iostream> using namespace std; int main() { int i,j,a; cout<<"\nEnter the value:"; cin>>a; for(i=1;i<=a;i++) { cout<<"\n"; for(j=i;j>0;j--) { cout<<j; } } return 0; }To download raw file Click Here
Enter the value:10 1 21 321 4321 54321 654321 7654321 87654321 987654321 10987654321
#include<iostream> using namespace std; int main() { int i,j,n; cout<<"\nEnter the value:"; cin>>n; for(i=1;i<=n;i++) { cout<<"\n"; for(j=1;j<=n-i;j++) { cout<<" "; } for(j=n;j>n-i;j--) { cout<<j; } } return 0; }To download raw file Click Here
Enter the value:10 10 109 1098 10987 109876 1098765 10987654 109876543 1098765432 10987654321
#include<iostream> using namespace std; int main() { int i,j,n; cout<<"\nEnter the value:"; cin>>n; for(i=0;i<n;i++) { cout<<"\n"; for(j=n-i;j<=n;j++) { cout<<j; } } }To download raw file Click Here
Enter the value:10 10 910 8910 78910 678910 5678910 45678910 345678910 2345678910 12345678910
#include<iostream> using namespace std; int main() { int i,j,n; cout<<"\nEnter the value:"; cin>>n; for(i=1;i<=n;i++) { cout<<"\n"; for(j=i;j<=n;j++) { cout<<j; } } return 0; }To download raw file Click Here
Enter the value:10 12345678910 2345678910 345678910 45678910 5678910 678910 78910 8910 910 10
#include<iostream> using namespace std; int main() { int i,j,n; cout<<"\nEnter the value:"; cin>>n; for(i=1;i<=n;i++) { cout<<"\n"; for(j=1;j<=i;j++) { cout<<" "; } for(j=n;j>=i;j--) { cout<<j; } } return 0; }To download raw file Click Here
Enter the value:10 10987654321 1098765432 109876543 10987654 1098765 109876 10987 1098 109 10
#include<iostream> using namespace std; int main() { int i,j,n; cout<<"\nEnter the value:"; cin>>n; for(i=1;i<=n;i++) { cout<<"\n"; for(j=1;j<=n-i;j++) { cout<<" "; } for(j=n;j>n-i;j--) { cout<<" "<<j; } for(j=n-i+2;j<n+1;j++) { cout<<" "<<j; } } for(i=1;i<=n;i++) { cout<<"\n"; for(j=1;j<=i;j++) { cout<<" "; } for(j=n;j>i;j--) { cout<<" "<<j; } for(j=i+2;j<=n;j++) { cout<<" "<<j; } } return 0; }To download raw file Click Here
Enter the value:10 10 10 9 10 10 9 8 9 10 10 9 8 7 8 9 10 10 9 8 7 6 7 8 9 10 10 9 8 7 6 5 6 7 8 9 10 10 9 8 7 6 5 4 5 6 7 8 9 10 10 9 8 7 6 5 4 3 4 5 6 7 8 9 10 10 9 8 7 6 5 4 3 2 3 4 5 6 7 8 9 10 10 9 8 7 6 5 4 3 2 1 2 3 4 5 6 7 8 9 10 10 9 8 7 6 5 4 3 2 3 4 5 6 7 8 9 10 10 9 8 7 6 5 4 3 4 5 6 7 8 9 10 10 9 8 7 6 5 4 5 6 7 8 9 10 10 9 8 7 6 5 6 7 8 9 10 10 9 8 7 6 7 8 9 10 10 9 8 7 8 9 10 10 9 8 9 10 10 9 10 10
Learn All in Tamil © Designed & Developed By Tutor Joes