+ 1

Java "Argentina" challenge // Conditionals

What I have to do in this code? ttps://www.sololearn.com/coach/23?ref=app import java.util.Scanner; public class Argentina { public static void main(String[] args) { Scanner leer = new Scanner(System.in); int vPesos = leer.nextInt(); int vDolares = leer.nextInt(); vDolares *= 50; if(vPesos > vDolares) { System.out.print("Dollars"); } else if(vPesos < vDolares) { System.out.print("Pesos"); } } }

7th Jan 2020, 5:59 PM
el3be
el3be - avatar
6 Respostas
+ 11
import java.util.Scanner; public class Program{ public static void main(String[] args) { Scanner sc=new Scanner(System.in); int pesos=sc.nextInt(); int dollor=sc.nextInt(); pesos/=50; if(pesos<dollor) System.out.println("Pesos"); else System.out.println("Dollars"); } }
9th Jan 2020, 4:33 PM
Saroj Patel
Saroj Patel - avatar
+ 2
Leandro Blandi Guys use the search button. Already was answered today. Convert from pesos to dollars. https://www.sololearn.com/Discuss/2125936/?ref=app
7th Jan 2020, 9:01 PM
Mihai Apostol
Mihai Apostol - avatar
0
import java.util.Scanner; public class Argentina { public static void main(String[] args) { Scanner leer = new Scanner(System.in); int vPesos = leer.nextInt(); int vDolares = leer.nextInt(); vDolares *= 50; if(vPesos > vDolares) { System.out.print("Dollars"); } else if(vPesos < vDolares) { System.out.print("Pesos"); } } }
7th Jan 2020, 6:38 PM
el3be
el3be - avatar
0
Throws me a error in the five #5 challenge
7th Jan 2020, 6:38 PM
el3be
el3be - avatar
0
Take a look at my code. It might help. int vPesos = input.nextInt(); int vDollars = input.nextInt(); vDollars *=51; if(vPesos > vDollars) { System.out.print("Dollars"); } else if(vPesos < vDollars) { System.out.print("Pesos"); }
9th Jan 2020, 10:06 AM
Anirudh Singh
Anirudh Singh - avatar
- 1
Says me that the output it's not wanted
7th Jan 2020, 6:38 PM
el3be
el3be - avatar