cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
I nead help with scanf!!!
I nead help with scanf!!!
Sep 12, 2013 at 5:36pm UTC
antonio matic
(1)
which letter shuld i change with ? in this code if input is for example 5+2, i nead some tipe which can read and symbols and numbers, i was searching on the internet but i couldnt find. I hope that there. Tnx!! sory for my bad english..
scanf(
"%?, &a);
Sep 12, 2013 at 5:49pm UTC
Stewbond
(2827)
I think this (Reads a number, then a character, then a number:
scanf(
"%d %c %d"
, &num1 , &oper , &num2 );
Or you could do this (reads a string). Then you can tokenize it later:
1
2
char
a[200]; scanf(
"%200[^\n]"
, a);
Last edited on
Sep 12, 2013 at 5:50pm UTC
Topic archived. No new replies allowed.