import java.util.*; class Program { public static void main(String[] args) { int ch; float usd,inr; | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

import java.util.*; class Program { public static void main(String[] args) { int ch; float usd,inr;

does anybody know what is the mistake in this program?

28th Jun 2017, 2:17 PM
Rajan Khorasiya
Rajan Khorasiya - avatar
5 ответов
+ 17
import java.util.*; class Program { public static void main(String[] args) { int ch; float usd,inr; } } /* You haven't closed the braces which you had opened at the beginning. That's the problem. Now it works fine. */
28th Jun 2017, 2:44 PM
Dev
Dev - avatar
28th Jun 2017, 2:47 PM
khadeeja Shamna
khadeeja Shamna - avatar
+ 8
this program is urs im just edited. use inr=in.nextFloat ();
28th Jun 2017, 2:51 PM
khadeeja Shamna
khadeeja Shamna - avatar
+ 1
import java.util.*; class InrtoUsd { public static void main(String m[]) { double inr,usd; Scanner in=new Scanner(System.in); System.out.println("Enter INR to convert into USD:"); inr=in.nextInt(); usd=inr/60; System.out.println("INR="+inr+" is USD="+usd); } } what is problem in this?
28th Jun 2017, 2:45 PM
Rajan Khorasiya
Rajan Khorasiya - avatar
+ 1
in o/p it shows that exception in thread ??
28th Jun 2017, 2:49 PM
Rajan Khorasiya
Rajan Khorasiya - avatar