2. Write a program that generates the following output:
10
9
Answers
Answered by
0
Explanation:
public class Simple
{
public static void main ()
{
int a=10;
int b=9;
System.out.println (a);
System.out.println (b);
}
}
Thanks ❤️
Please mark me as brainliest!
Answered by
0
Program in python:
Explanation:
a=10#intialize a value to the a variable
for x in range(2):# for loop to print the series.
print(a-x)#print the series.
Output:
- The above code will display the 10 and 9 in sequential line.
Code Explanation:
- The above code is written in python language, in which the for loop executes two times to print the series.
- The user can increase the times of a for-loop which will increase the size of the series.
- To do this a user needs to increase the range value of the loop.
Learn More:
- Python : https://brainly.in/question/14689905
Similar questions