/*
Floyd's Triangle:
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15
*/
#include<iostream>
using namespace std;
int main()
{
int i,j,p;
for(i=1,p=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
cout<<p<<" ";
p++;
}
cout<<endl;
}
}
//Java Program to count the total number of characters in a string import java.util.*; public class CountChars { public static void mai...
No comments:
Post a Comment