Advertisement
Guest User

Untitled

a guest
Jul 28th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | None | 0 0
  1. #include <iostream>
  2. #include <string.h>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7.    // for (var line = "#"; line.length > 8; line +="#") console.log (line)
  8.     int a;
  9.    
  10.     cout << "Введите число: " << endl;
  11.     cin >> a;
  12.    
  13.    
  14.     char buf[a];
  15.    
  16.     for(int i = 0; i < a; i++)
  17.     {
  18.     buf[i] = '*';
  19.    
  20.     cout << buf << endl;
  21.    
  22.     }
  23.  
  24.    
  25.             return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement