Loading...

Print integer C Program


C Program which take input an integer and print it:

#include <stdio.h>
main()
{
    int a;

    printf("Enter an integer: ");
    scanf("%d",&a);

    printf("Enter integer is %d",a);
}


Also by Making Function of it:


#include <stdio.h>
void printinteger();
main()
{
    printinteger();
}
void printinteger()
{
    int a;

    printf("Enter an integer: ");
    scanf("%d",&a);

    printf("Enter integer is %d",a);
}
Rate this posting:
{[['']]}

0 comments:

Post a Comment

 
TOP