#include<iostream.h>
#include<conio.h>
main()
{
char a[6],i=0;
clrscr();
a[i]='H';
a[++i]='E';
a[++i]='L';
a[++i]='L';
a[4]='O';
a[5]='\0';
cout<<"\n A[0] :"<<a[0];
cout<<"\n A[1] :"<<a[1];
cout<<"\n A[2] :"<<a[2];
cout<<"\n A[3] :"<<a[3];
cout<<"\n A[4] :"<<a[4];
getch();
}
==========================
#include<iostream.h>
#include<conio.h>
main()
{
char a[50];
clrscr();
cout<<"\n Enter Your Name ";
cin>>a;
cout<<"\n Your Name is "<<a;
getch();
}
==============================
#include<iostream.h>
#include<conio.h>
void main()
{
int a[5];
clrscr();
a[0]=100;
a[1]=200;
a[2]=300;
a[3]=400;
a[4]=500;
cout<<"\n A[0] :"<<a[0];
cout<<"\n A[1] :"<<a[1];
cout<<"\n A[2] :"<<a[2];
cout<<"\n A[3] :"<<a[3];
cout<<"\n A[4] :"<<a[4];
getch();
}
=======================
#include<iostream.h>
#include<conio.h>
main()
{
int a[5],i;
clrscr();
cout<<"\n Enter 5 Numbers\n";
for(i=0;i<5;i++)
cin>>a[i];
cout<<"\n Given 5 Numbers\n";
for(i=0;i<=4;i++)
cout<<"\n"<<a[i];
getch();
}
#include<conio.h>
main()
{
char a[6],i=0;
clrscr();
a[i]='H';
a[++i]='E';
a[++i]='L';
a[++i]='L';
a[4]='O';
a[5]='\0';
cout<<"\n A[0] :"<<a[0];
cout<<"\n A[1] :"<<a[1];
cout<<"\n A[2] :"<<a[2];
cout<<"\n A[3] :"<<a[3];
cout<<"\n A[4] :"<<a[4];
getch();
}
==========================
#include<iostream.h>
#include<conio.h>
main()
{
char a[50];
clrscr();
cout<<"\n Enter Your Name ";
cin>>a;
cout<<"\n Your Name is "<<a;
getch();
}
==============================
#include<iostream.h>
#include<conio.h>
void main()
{
int a[5];
clrscr();
a[0]=100;
a[1]=200;
a[2]=300;
a[3]=400;
a[4]=500;
cout<<"\n A[0] :"<<a[0];
cout<<"\n A[1] :"<<a[1];
cout<<"\n A[2] :"<<a[2];
cout<<"\n A[3] :"<<a[3];
cout<<"\n A[4] :"<<a[4];
getch();
}
=======================
#include<iostream.h>
#include<conio.h>
main()
{
int a[5],i;
clrscr();
cout<<"\n Enter 5 Numbers\n";
for(i=0;i<5;i++)
cin>>a[i];
cout<<"\n Given 5 Numbers\n";
for(i=0;i<=4;i++)
cout<<"\n"<<a[i];
getch();
}
No comments:
Post a Comment