How do I read more than two inputs in the same line with the exception that they have to be separate by one single space? In C++ | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

How do I read more than two inputs in the same line with the exception that they have to be separate by one single space? In C++

Gives me examples using printf or cin

30th Apr 2018, 1:08 PM
Ronald ErnestoTejada RĆ­os
Ronald ErnestoTejada RĆ­os - avatar
1 Resposta
0
you can do this in C++ cin>>num1>>num2>>num3; or in C scanf("%d%d%d",num1,num2,num3); space can't be use since C ignores it.
30th Apr 2018, 2:53 PM
Elliot
Elliot - avatar