WAP to display a right angle triangle pattern in c plusplus
using 2-D integer array only.
Answers
Explanation:
#include <iostream>
using namespace std;
int main()
{
int i,j,rows;
cout << "\n\n Display the pattern using number starting from 1:\n";
cout << "------------------------------------------------------\n";
cout << " Input number of rows: ";
cin >> rows;
for(i=1;i<=rows;i++)
{
for(j=1;j<=i;j++)
cout<<j;
cout<<endl;
}
}
Answer:
I have a good time to explore new ways of learning and smart ways of learning and smart ways of learning and smart ways of learning and smart ways of learning and smart ways of learning and smart ways of learning and smart ways of learning and smart ways of learning and smart ways of learning and smart ways of learning and smart ways of learning and smart ways of learning and smart ways of learning and smart ways of learning and smart ways of learning and smart ways of learning and smart