Home » , » C - User Input

C - User Input

 C - User Input

To get user input in C language, use the scanf(). It is used to read the data input by the user on the console. Let us see an example C program to get input from the user.

C program to print an integer entered by the user

Let us see an example to enter an integer from the user using scanf() and display using printf():





Output



C program to print the multiplication of integers entered by the user

Let us see another example wherein we will get three numbers from the user and multiply them:




Output

Enter the 1st number = 5
Enter the 2nd number = 10
Enter the 3rd number = 15
Multiplication Result = 750

If you liked the tutorial, spread the word and share the link and our website LANGUAGE CODING with others. others.


0 comments:

Post a Comment

Popular Posts

GENRES

 
Copyright ©

latest code update bloggingskillBest coding website in india

Created By Sora Templates | Distributed By Gooyaabi Templates