We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a95884d commit 978fe47Copy full SHA for 978fe47
challenge10.java
@@ -0,0 +1,17 @@
1
+import java.util.Scanner;
2
+
3
+// Create a program that determines if a number is positive, negative, or zero.🚀
4
+public class challenge10 {
5
+ public static void main(String[] args) {
6
+ Scanner sc = new Scanner(System.in);
7
+ System.out.print("Please enter number: ");
8
+ int input = sc.nextInt();
9
+ if(input < 0){
10
+ System.out.println("Number is negative: "+input);
11
+ } else if(input == 0){
12
+ System.out.println("Number is Zero: "+input);
13
+ } else{
14
+ System.out.println("Number is positive: "+input);
15
+ }
16
17
+}
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments