Sunday, 8 January 2012

C ++ PROGRAMS


1.
#include<iostream.h> //write a pgm to display the name of a person
#include<conio.h>
void main()
{
cout<<"SETHU";
getch();
}

2.
#include<iostream.h> //display the name,address of a person(pgm-2)
#include<conio.h>
void main()
{
cout<<"sethu\n";
cout<<"ambalathara\n";
cout<<"sethubhavan\n";
getch();
}



3.
#include<iostream.h> //write apgm to find square of a no
#include<conio.h>
main()
{
clrscr();
int a,square;
a=3;
square=a*a;
cout<<"square="<<square;
getch();
}


No comments:

Post a Comment