Sunday 12 July 2015

  • Sunday, July 12, 2015
c program print integer 

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>
int main()
{
    int num;
    printf("Enter a integer: ");  
    scanf("%d",&num);  /* Storing a integer entered by user in variable num */
    printf("You entered: %d",num);
    return 0;
}















Output of program:



Enter a integer: 25
You entered: 25


Related Posts Plugin for WordPress, Blogger...

Vacancy

RBI has announced the recruitment for 134 GRADE B OFFICERS.
 The examination will be in two phases.
 The detailed advertisement will be published on 5th October.

Popular Posts