Monday, September 16, 2019

Write a program to print half pyramid / triangle using numbers

Code
#include <iostream>
using namespace std;
int main()
{
      int i, j, k;
      cout<< "Enter a positive number : ";cin>>k;

      for(i=1; i<=k; i++)
    {

              for(j=1; j<=i; j++)
           {
                    cout<< j << " ";
            }
        cout<<endl;
      }



 return 0;
}


Output-






Video - 



2 comments:

  1. Merit Casino and Sports Betting Apps in Poland
    Merit online casino and sports betting apps in 카지노 가입 쿠폰 Poland, 메리트 카지노 주소 Europe, Asia, rb88 Africa.

    ReplyDelete
  2. There are 1000's of video games out there to play at Punt, with new ones being added each week. Red Dog's customer service group is out there to you 24/7 through reside chat. For these of you who'd favor to talk to an actual agent, you should use|you have to use} their contact quantity as a substitute. Ignition's method to buyer care takes on a hybrid method, during which they offer up group as another way to solve your points 메리트카지노 before escalating to buyer support.

    ReplyDelete

C++ BLACKJACK

#include <iostream> #include <ctime> #include <stdlib.h> #include <time.h> #include <string> using namesp...