package com.codegym.task.task06.task0620;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/*
Fixing the mistakes of youth
*/
public class Solution {
public static int max = 100;
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String max = "The max is ";
int a = Integer.parseInt(reader.readLine());
int b = Integer.parseInt(reader.readLine());
String fgGF = reader.readLine();
int satya = Integer.parseInt(fgGF);
// int satya;
//int a = 89;
//int b = 88;
satya = a > b ? a : b;
System.out.println(max + satya);
}
}
Why amn't I satisfying with the last condition
Resolved
Comments (6)
- Popular
- New
- Old
You must be signed in to leave a comment
satya vath
22 November 2018, 01:24
Thank you i have solved it
0
satya vath
21 November 2018, 02:02
i have kept it because i need anoher variable to make the code print
0
Michael Martin
21 November 2018, 14:56
Ok. But you are using that variable to read a string via readLine(); There should only be two inputs to the program (both ints)
0
satya vath
20 November 2018, 15:15
micheal can you say the answer
0
Michael Martin
20 November 2018, 16:18
Just telling you the answer doesn't help you. In your code why do you have this line:
String fgGF = reader.readLine();
0
Michael Martin
20 November 2018, 14:58
Why are you doing 3 readLine() method calls? You only need to input 2 numbers.
0