Monday, September 16, 2019

Write a C++ program to print half pyramid / triangle using *

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<< " * ";
             }
         cout<<endl;
      }



 return 0;
}


Output








 Video - 


1 comment:

  1. The genres are diversified, so you'll be able to|you presumably can} decide the one that seems the most interesting to you. Let your appreciations information you - there are no incorrect selections here. Wildz Casino is residence to extensive variety|all kinds} of online on line casino video games, featuring titles developed by variety 다파벳 of the} premier software program houses similar to Play’n GO, Microgaming, NetEnt, heaps of|and plenty of} extra. With a real money sport, similar to actual money video poker video games, you must enter a stake and place a guess.

    ReplyDelete

C++ BLACKJACK

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