C Program:-
#include<stdio.h>
#include<conio.h>
void main(void)
{
clrscr();
int a;
printf("\n Enter the value of a=");
scanf("%d",&a);
printf("\n The value of a= %d",a);
getch();
}
Same Program in C++:-
#include<iostream.h>
#include<conio.h>
void main(void)
{
clrscr();
int a;
cout<<" Enter the value of a="<<endl;
cin>>a;
cout<< The value of a="<<a<<endl;
getch();
}
Output:-
Enter the value of a= 4
The value of a= 4
No comments:
Post a Comment