Can someone answers this!!!!!1 Ask the user to input an integer. Print out the next three consecutive numbers.
Answers
Answered by
1
Explanation:
The next three consecutive numbers are;
x, x + 1 and x + 2.
Hope you Understood.
Please mark me BRAINLIST.
Answered by
1
Answer:
In java.
Explanation:
Using Scanner,
import java.util.Scanner;
class Input {
public static void main(String [ ] args) {
int n = new Scanner(System.in).nextInt();
int a=n+1,b=n+2,c=n+3;
System.out.println("entered number= "+n);
System.out.println("Three Consecutive are : "+a+","+b+","+c);
}
}
Similar questions