forked from Aniket965/Hello-world
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHELLO WORLD !!.CPP
50 lines (40 loc) · 1.12 KB
/
HELLO WORLD !!.CPP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// CODING IN TURBO C++ //
** PRINTING OF “HELLO WORLD !!” **
( USING LOWER & UPPER TRAINGLE OF A MATRIX)
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int i,j,a[10][10],r,c;
cout<<" ### Showing Hello World !!! ###\n";
cout<<" ---XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX---";
cout<<"\n Enter Rows:";
cin>>r;
cout<<"\n Enter Columns:";
cin>>c;
cout<<"--------------------------------------------------------------------------------\n";
cout<<" ";
for(i=0;i<r;i++)
{ for(j=0;j<c;j++)
{ if(i>=j)
cout<<"*";
else cout<<" ";
}
cout<<" ";
}
cout<<" HELLO WORLD !! \n";
cout<<" ";
for(i=0;i<r;i++)
{ for(j=0;j<c;j++)
{
if(i<=j)
cout<<"*";
else
cout<<" ";
}
cout<<" ";
}
cout<<" -------------------------------------------------------------------------------- ";
getch();
}