write a program to print the first 20 natural numbers in reverse order .
Answers
Answered by
2
class abc { void main() { int i; for(i=20; i>=0; i--) System.out.println(i); } } Hope it helps :-)
lizziebarman21:
it helped a lot thank you so so much to answer this question
Answered by
4
Answer:
public class Test
{
void prnRevNaturalNos( )
{
int i ;
for( i = 20 ; i > = 1 ; i-- )
System.out.print( i ) ;
}
}
Output produced is:
20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
Java:
Java is a popular third-generation programming language, which can be used to do any of the thousands of things that a computer software can do.
With the features it offers, Java has become the language of choice for internet and intranet applications.
Java plays an important role for the proper functioning of many software-based devices attached to the network.
Similar questions