What do you want to save?
Add Code snippet
New code examples
-
C++ 2022-02-07 19:20:10
cin.peek() c++
cin.peek() : Returns the next character in the input sequence. Add solution -
Rust 2021-11-11 13:17:12
rust spinning rod animation in text
let characters = ['|', '/', '-', '\\']; let mut current = 0; println!("{}[2J", 27 as char); // Clear screen. loop { println!("{}[;H{}", 27 as char, characters[current]); // Move cursor to 1,1 and output the ... Add solution -
C 2021-10-12 10:17:05
how to stop scanf from adding a new line in c
For a simple solution, you could add a space before the format specifier when you use scanf(), for example: scanf(" %c", &ch); The leading space tells scanf() to skip any whitespace characters (including newline) before reading the next char... Add solution