Tuesday, 29 July 2014

C program print integer

Advertisement

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.
In c language we have data type for different types of data, for integer data it is int, for character date char, for floating point data it's float and so on.

C programming code

#include 
 
int main()
{
int a;
 
printf("Enter an integer\n");
scanf("%d", &a);
 
printf("Integer that you have entered is %d\n", a);
 
return 0;
}


EmoticonEmoticon

:)
:(
hihi
:-)
:D
=D
:-d
;(
;-(
@-)
:o
:>)
(o)
:p
:-?
(p)
:-s
8-)
:-t
:-b
b-(
(y)
x-)
(h)