Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 80bda62

Browse files
🍵
1 parent aabefaa commit 80bda62

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

‎challenge6.java‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import java.util.Scanner;
2+
3+
// Create a program that takes two numbers and show result of all arithmetic operators (+,-,*,/,%) .🚀
4+
public class challenge6 {
5+
public static void main(String[] args) {
6+
Scanner input = new Scanner(System.in);
7+
System.out.print("Enter First Number: ");
8+
int fn = input.nextInt();
9+
System.out.print("Enter Second Number: ");
10+
int sn = input.nextInt();
11+
System.out.println("\n The all arithmetic result of your two number is: ");
12+
int plus = fn + sn;
13+
System.out.println("The Addition of First or Second is: "+plus);
14+
int minus = fn - sn;
15+
System.out.println("The Subtraction of First or Second is: "+minus);
16+
int multi = fn * sn;
17+
System.out.println("The Multiplication of First or Second is: "+multi);
18+
int div = fn / sn;
19+
System.out.println("The Division of First or Second is: "+div);
20+
int modules = fn % sn;
21+
System.out.println("The Percentage of First or Second is: "+modules);
22+
}
23+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /