C - Input/Output
#include <stdio.h>
int main()
{
int testInteger;
printf("Enter an integer: ");
scanf("%d",&testInteger);
printf("Number = %d",testInteger);
return 0;
}
Above program shows how we can input value to a program and how to print that value entered.
%d is used to indicate integer input or output.
Same as that we use,
- %f - float
- %c or %s - char
- %f - double
Comments
Post a Comment