C Program to accept and print the mobile number
#include <stdio.h>
int main()
{
long int n;
printf("Enter your mobile number : ");
scanf("%ld",&n);
printf("The mobile numbers entered is : %ld",n);
return 0;
}
Output:
Explanation:
Hi, in this program to accept the number we use long int datatype , whose format specifier is "%ld" and we print the number using printf function.
Tags:
c programming examples