Tuesday, 22 December 2020

Write a Program in C++ to Print :

/*
*
* *
* * *
* * * *
* * * * * 
*/
#include<iostream>
using namespace std;
main()
{
   for(int i=1;i<=5;i++)
   {
       for(int j=1;j<=i;j++)
       cout<<"* ";
       cout<<"\n";
   }
}

No comments:

Post a Comment

Java Program to count the total number of characters in a string

 //Java Program to count the total number of characters in a string import java.util.*; public class CountChars {     public static void mai...