- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Java program to multiply given floating point numbers
Example
Following is a program to multiply given floating point numbers.
import java.util.Scanner; public class MultiplyFloatingNumbers { public static void main(String args[]){ Scanner sc = new Scanner(System.in); System.out.println("Enter first floating point number."); float flt1 = sc.nextFloat(); System.out.println("Enter second floating point number."); float flt2 = sc.nextFloat(); float product = flt1*flt2; System.out.println("Product of given floating point numbers ::"+product); } }
Output
Enter first floating point number. 2.2 Enter second floating point number. 6.3 Product of given floating point numbers ::13.860001
Advertisements