You are on page 1of 2

Group-A

No 1. Write a Java Program to print stars in console in the following manner.


*
**
***
****
*****
Ans.
Aim of the Experiment:
To print the stars in console in the following manner.
*
**
***
****
*****
Procedure:
Launch NetBeans IDE.
Start a new Java Application.
Coding:
Write the following lines of code in the Source Code window.
public class Printstars
{
public static void main(String args[])
{
int x,y;
for(x=1;x<=5;x++)
{
System.out.print("\n");
for(y=1;y<=x;y++)
System.out.print("*");
}
}
}
Running:
After coding press ctrl+F6 button to run the program.
Output:

Conclusion:
From the above experiment we can print the pyramid of stars.
No2. Create a sample web-page with background color pink, displaying a student’s name and roll no in bold letter.
Ans.
Aim of the Experiment:
To design a sample web-page with background color pink, displaying a student’s name and roll no in bold letter.
Procedure:
Open Notepad and write the following lines of HTML code.

You might also like