Commit inicial
commit
6e2abaf1e3
|
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue