This c program first inputs an integer and then prints it. Input is done using scanf function and number is printed on screen using printf.
C programming code
#include <stdio.h>
#include<conio.h>
void main()
{
int a;
clrscr();
printf("Enter an integer\n");
scanf("%d", &a);
printf("Integer that you have entered is %d\n", a);
getch();
}
C programming code
#include <stdio.h>
#include<conio.h>
void main()
{
int a;
clrscr();
printf("Enter an integer\n");
scanf("%d", &a);
printf("Integer that you have entered is %d\n", a);
getch();
}
No comments:
Post a Comment