Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

How do you make User Inputs?

+1 vote
asked Apr 21, 2019 by anonymous
I am a new programmer with C and am stumped on how to make a user input. Could someone please tell me how?

2 Answers

0 votes
answered Apr 22, 2019 by anonymous
if you are asking about getting an input from user (using terminal window) it looks something like this:

int input;

scanf("%d",&input); //this statement will get an input from user and store into variable input with type int. hope this helped
0 votes
answered Apr 23, 2019 by Matthew Green (260 points)

Try something like this


void main()


int a;



You need to declare an integer and then write the scanf code corresponding to it

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.