cambiar %s por %[^
] y funcionarán los espacios
Ejemplo:
char variable[50];
printf("Ingresa el valor:
");
scanf("%[^
]", variable);
Code Example |
---|
Cpp :: return the index where maximum element in a vector |
Cpp :: c++ find index of an element |
Cpp :: c++ replace character in string |
Cpp :: c++ split long code |
Cpp :: fibonacci in c++ |
Cpp :: min heap in c++ |
Cpp :: sort in descending order c++ stl |
Cpp :: c++ std::find with lambda |
Cpp :: Array implementation of Queue using class in c++ |
Cpp :: c++ string to double |
Cpp :: recursive binary search |
Cpp :: c++ parse int |
Cpp :: cpp float to int |
Cpp :: function as argument in another function in c++ |
Cpp :: easy c++ code |
Cpp :: c++ create threads |
Cpp :: cmath sqrt |
Cpp :: how to get a letter from the users string in c++ |
Cpp :: c++ lock |
Cpp :: read file into vector |
Cpp :: convert int to enum c++ |
Cpp :: random number in a range c++ |
Cpp :: c++ replace string |
Cpp :: use lower bound in pair vector |
Cpp :: rand c++ |
Cpp :: how to clear vector c++ |
Cpp :: c++ initialize multidimensional vector |
Cpp :: get window position |
Cpp :: play audio c++ |
Cpp :: remove decimal c++ |