Write a program in C++ to display the pattern like right angle triangle with a number. ..


#include <iostream>
using namespace std;
void main()
{
int i,j,rows;
cout<<"input number of rows :";
cin>>rows;
for(i=1;i<=rows;i++)
{
for(j=1;j<=i;j++)
{
cout<<j;
}
cout<<endl;
}
    system ("pause");
}

Write a program in C++ to display the pattern like right angle triangle with a number. .. Write a program in C++ to display the pattern like right angle triangle with a number. .. Reviewed by Unknown on May 18, 2017 Rating: 5

No comments:

Powered by Blogger.