SHOW:
|
|
- or go back to the newest paste.
1 | let add x y = x + y | |
2 | ||
3 | let () = | |
4 | - | let age = ref 0 and |
4 | + | let age = ref 0 and |
5 | name = ref "" in | |
6 | ||
7 | print_string ( "what's your name? " ); | |
8 | name := read_line (); | |
9 | ||
10 | print_string "what's your age? "; | |
11 | age := int_of_string (read_line ()); | |
12 | ||
13 | - | print_endline ("hello " ^ !name ^ " i see you have " ^ ( string_of_int !age ) ^ " years old!" ); |
13 | + | print_endline ( |
14 | "hello " ^ !name ^ | |
15 | " i see you are " ^ | |
16 | ( string_of_int !age ) ^ " years old!" | |
17 | ); | |
18 | ||
19 | if (!age<18) then | |
20 | print_endline ( "so you are a minor!" ) else | |
21 | print_endline ( "why you are not in the school?" ); | |
22 |