mercredi 23 novembre 2022

I had typed a code and i dont know why no output is coming not its showing any error. its just completly blank [duplicate]

import java.util.*;
public class lec6live {
    public static void main(String args[]) {

        for (int line = 1; line <=4; line--) {
            for (int star =4; star <=line; star--) {
                System.out.print("*");
            }
            System.out.println();
        }
    }
}

I was expecting

****

***

**

*

but not getting any result its completely blank. let me know the reason why?

Aucun commentaire:

Enregistrer un commentaire