in Virtual Machine Take any integer from user. If it’s positive, print the integer. Otherwise,
program should be closed.
Answers
Answered by
2
Answer:
import java.uti.*;
public class positive {
public static void main (String [] args){
Scanner s =new Scanner (System.in);
System.out.println("Enter number");
int a =s.nextInt();
if(a>0)
System.out.println(a);
}}
Explanation:
pls mark as BRAINLIEST I will follow and thank you
Similar questions
History,
1 month ago
Math,
2 months ago
English,
2 months ago
Social Sciences,
9 months ago
Chemistry,
9 months ago