Commit inicial

master
250421 2025-11-11 11:22:32 +00:00
commit 6e2abaf1e3
1 changed files with 24 additions and 0 deletions

View 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();
}
}
}