SHARE
TWEET

Untitled

a guest Jun 19th, 2017 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3. int main()
  4. {
  5.     long long int input;
  6.     std::cout << "Input="; std::cin >> input;
  7.     do
  8.     {
  9.         std::cout << "Invalid input. Please, try again." << std::endl;
  10.         std::cout << "Input="; std::cin >> input;
  11.     }
  12.     while(input > 50);
  13.     for(int i = 0; i <= input; i++)
  14.     {
  15.         for(int k = 0; k < i; k++)
  16.         {
  17.             std::cout << "* ";
  18.         }
  19.         std::cout << std::endl;
  20.     }
  21.     return 0;
  22. }
RAW Paste Data
Top