Commit inicial
This commit is contained in:
24
src/main/java/com/mycompany/proj/App.java
Normal file
24
src/main/java/com/mycompany/proj/App.java
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
*/
|
||||
|
||||
package com.mycompany.proj;
|
||||
|
||||
import java.util.Scanner;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author 250421
|
||||
*/
|
||||
public class App {
|
||||
|
||||
public static void main(String[] args) {
|
||||
Scanner scanner= new Scanner (System.in);
|
||||
System.out.println( "Introduza um nuemro positvo") ;
|
||||
int numero = scanner.nextInt();
|
||||
while( numero < 0 ){
|
||||
System.out.println("introduza um numero positivo");
|
||||
numero = scanner.nextInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user