Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  Y
Language: JAVA
Code:
import java.util.Scanner;
public class Amir {
    public static void main(String[] args) {
        Scanner input=new Scanner(System.in);
        System.out.print("Enter a number:");
        int a=input.nextInt();
        for(int i=0, i<a,i++){
 
            int f=(2*i);
            for(int j=0,j <= f, j++) {
                System.out.print('*');
            }
            System.out.println();
        }
    }
}
Comments: