Horje
print  pattern and space in cpp Code Example
print pattern and space in cpp
//WAP to print triangle pattern... LOGIC
int num{}, i{1};
  cin >> num;
  while (i <= num) {
    for (int space = 1; space <= (num - i); space++) {  // space
      cout << " ";
    }
    for (int value = 1; value <= (2 * i - 1); value++) {  // value
      cout << value;
    }
    cout << endl; //next row
    i++;
  }




Cpp

Related
cpp loop through object Code Example cpp loop through object Code Example
generate random string in c++ Code Example generate random string in c++ Code Example
life the universe and everything solution c++ Code Example life the universe and everything solution c++ Code Example
bash find into array Code Example bash find into array Code Example
sort vector of strings Code Example sort vector of strings Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8