kiwivr

Untitled

Oct 29th, 2025
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. use std::io::stdin;
  2. use std::{io, string};
  3.  
  4. fn main() {
  5. println!("calculator");
  6. let mut number_one = String::new();
  7. println!("please provide your favorite number:");
  8. stdin().read_line(&mut number_one).expect("Error within input...");
  9.  
  10. let number_one: i32 = number_one.trim().parse().expect("ERROR!");
  11.  
  12. if number_one == 67 || number_one == 41 {
  13. println!("FUCK YOU");
  14. exit(true);
  15. }
  16. else{
  17. println!("i love you");
  18. }
  19.  
  20.  
  21. fn exit(shouldrun: bool){
  22.  
  23. if (shouldrun){
  24. std::process::exit(0);
  25. }
  26. }
  27. }
  28.  
Add Comment
Please, Sign In to add comment