Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- static int toF(int t){
- return t*9/5+32;
- }
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- String st=sc.nextLine();
- while (!st.equals("q")){
- int t=Integer.parseInt(st);
- System.out.println(toF(t));
- st=sc.nextLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement