• Courses
  • Code Compiler
  • Discuss
  • Pricing
  • Teams
Menu
0

How take a input only as numbers in c? If it’s character I want it to display “error”.

c
26th Nov 2019, 3:36 PM
Jirapat Panyacharoen
2 Answers
+ 4
For example (with an int): int x; scanf("%d", &x);
26th Nov 2019, 3:39 PM
HonFu
HonFu - avatar

Often have questions like this?

Learn more efficiently, for free:

  • Introduction to Python

    7.1M learners

  • Introduction to Java

    4.7M learners

  • Introduction to C

    1.5M learners

  • Introduction to HTML

    7.5M learners

See all courses
Hot today
How to install Bcrypt here
1 Votes
Codegames
1 Votes
ŰčÙŰ§ÙƒÙ… ŰšŰșيŰȘ Ù†ŰłÙˆÙ„ÙƒÙ… ÙƒÙŠÙŰ§ŰŽ Ù†ŰŻÙŠŰ± ÙƒÙˆŰŻ ويكون Ű”Ű­ÙŠŰ­ŰŸ
1 Votes
What is happening with sololearn
1 Votes
CAN I FOLLOW YOU🙏🙏!!!
2 Votes
Can sololearn have multiple inpus&outputs?
3 Votes
CAN ANYONE TELL ME WHAT TO LEARN NEXT AFTER ADVANCED PYTHON CONCEPTS
1 Votes
How can I add images to my website
0 Votes
Programming language learning
0 Votes
How to start coding
0 Votes