The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!
#include <iostream>
#include <string>
void main()
{
std::cout << "Please enter the number: ";
int n = 0;
std::cin >> n;
for (int i = 1 ; i <= n; ++i)
{
for (int j = 1 ; j <= i; ++j)
{
std::cout << "*";
}
std::cout << std::endl;
}
}
Please enter the number: 30
*
**
***
****
*****
******
*******
********
*********
**********
***********
************
*************
**************
***************
****************
*****************
******************
*******************
********************
*********************
**********************
***********************
************************
*************************
**************************
***************************
****************************
*****************************
******************************
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Join the community of 500,000 technology professionals and ask your questions.