public class StarPyramid
{
public static void main(String [] args)
{
int space = 0, line = 0, star = 0;
for(line = 1; line <= 26; line ++)
{
for(space = 26; space > line; space--)
{
System.out.print(" "); // Display one space
}
for(star = 1; star < line; star++)
{
System.out.print("*‟);
}
for(star = line; star >= 1; star--)
{
System.out.print("*‟);
}
System.out.println(); // Display new line with ln
}
}
}
class star
{
public static void main(String args[])
{
int i,j;
for(i=1;i<6;i++)
{
for(j=1;j<=i;j++)
System.out.print("*");
System.out.println();
}
import java.util.Scanner;
/*
* Some this is reverse type of Pyramids
* Engr Sajjad Hussain Panhwar
* Contact me (engr.sajad83@gmail.com)
* Mobile No:+923023271032
*/
class test{
public static void main(String arg[]){
System.out.print("Enter a number");
Scanner in=new Scanner(System.in);
int n=in.nextInt();
for(int i=n; i>0; i--){
for(int j=n-i; j>0; j--) //this is for space
System.out.print(" ");
for(int k=(i-1); k>0; k--)//this is for stars
System.out.print(" *");
System.out.println();// new line
}}
}
*****************************output******************************
Enter a number 8
* * * * * * * * *
* * * * * * * *
* * * * * * *
* * * * * *
* * * * *
* * * *
* * *
* *
*
public class Test {
public static void main(String[] args) {
System.out.println("*");
}
}
The above program will print one "*" symbol in the console
i want to write a simple without using pointer or array c program which will print greatest number when i give 20 number .........How far have you gotten so far?
echo 'print a pattern'
Q.1 Write a program to print first ten odd natural numbers. Q.2 Write a program to input a number. Print their table. Q.3 Write a function to print a factorial value.
Cls input "enter two no.s ",a,b sum=a+b print "sum = ";sum end
printf ("initials");
123454321
Here is a simple Python program to print asterisks as described: for i in range(1, 26): print('*' * i) This will output asterisks from 1 to 25 as required.
i want to write a simple without using pointer or array c program which will print greatest number when i give 20 number .........How far have you gotten so far?
hi question is here, 1 1 2 1 2 3 1 2 3 4
echo 'print a pattern'
write a program to print A to Z on screen in c?
To print out Christmas card is simple. You need cardstock and a printer attached to your computer. You can create cards of your own with a Word or card program you may have installed on your computer or go to a website such as Ecards.
Print Server
print it how you normally would and then staple it together.. simple
Use the option File / Print in the program you are using.
If your screen does not give you an option to Print then save the document to a word program and print from there.
Select the answer, copy and paste into a word processing program, and print as you would print any other document.