0% found this document useful (0 votes)
25 views2 pages

Program # 5: Aim:-Write A Program Take Input Using Bufferedreader Class. Coding

This program takes input from the user using a BufferedReader for an amount, interest rate, and time period. It then calculates the interest on the amount by multiplying the amount, rate, and time and dividing by 100 before printing out the result.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
0% found this document useful (0 votes)
25 views2 pages

Program # 5: Aim:-Write A Program Take Input Using Bufferedreader Class. Coding

This program takes input from the user using a BufferedReader for an amount, interest rate, and time period. It then calculates the interest on the amount by multiplying the amount, rate, and time and dividing by 100 before printing out the result.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 2

Program # 5

Aim :- Write a program take input using BufferedReader class. Coding :class Prog5 { public static void main(String args[]) { BufferedReader stdin=new BufferedReader(new InputStreamReader(System.in));

try{ float amount,rate; int time; System.out.print("Enter Amount :\t"); amount=Float.parseFloat(stdin.readLine()); System.out.print("\nEnter rate :\t"); rate=Float.parseFloat(stdin.readLine()); System.out.print("\nEnter time :\t"); time=Integer.parseInt(stdin.readLine()); stdin.close(); System.out.print("\nIntrest is :\t"+(amount*rate*time)/100);

} catch(IOException e){ e.printStackTrace(); } } }

Output :Enter Amount : Enter rate : Enter time : Intrest is : 13 3 468.0 1200

You might also like