Write a program in C++ to make such a pattern like right angle triangle with number increased by 1. .


#include <iostream>
using namespace std;
void main()
{
   int i,j,rows,k=1;
        cout<<"Input number of rows : ";
        cin>>rows;
   for(i=1;i<=rows;i++)
   {
for(j=1;j<=i;j++)
{
  cout<<k++;
}
cout<<"\n";
   }    system ("pause");
}
Write a program in C++ to make such a pattern like right angle triangle with number increased by 1. . Write a program in C++ to make such a pattern like right angle triangle with number increased by 1. . Reviewed by Unknown on May 18, 2017 Rating: 5

No comments:

Powered by Blogger.