Function to print star triangle in c++
#include
#include
void starfunction(int); //You can give any function name
void main()
{
int a;
clrscr();
cout<<"Enter number of rows required:";
cin>>a;
star(a);
getch();
}
void starfunction(int r )
{
for(int i=1;i<=r;i++)
{
for(int j=1;j<=i;j++)
{
cout<<"*";
}
cout<<"\n";
}
}
Function to print star triangle in c
#include
#include
void starfunction(int); //You can give your own function name
void main()
{
int a;
clrscr();
printf("Enter number of rows required:");
scanf("%d",&a);
star(a);
getch();
}
void starfunction(int r )
{
int i,j;
for( i=1;i<=r;i++)
{
for( j=1;j<=i;j++)
{
printf("*");
}
printf("\n");
}
}
... int i; for( i = 0; i < 7; ++i ) { printf("*"); } printf("\n"); ...
strText$ = "Some text to be underlined." CLS PRINT strText$ PRINT STRING$(LEN(strText$), "*")
public class Traingle { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub char c=' '; for (int i=0; i<4; i++) { for (int k=0; k<6-i; k++) { System.out.print(" "); } for (int j=0; j<i*2+1; j++) { System.out.print("*"); } System.out.println(c); } } }
There is insufficient information in the question to answer it properly. What do you mean by "diamond". Are we talking Pascal's Triangle. Are we talking a diamond shaped field of stars? What? Please restate the question.
(don't forget to include) #include <iomanip> cout << setfill('*') < <setw(35) << '*' <<endl;
Write a function that print a triangle of stars.
write a c++ programe to print a triangle without (for)
Try the triangle program on a search engine. Replace numbers with stars and that should do the trick
... int i; for( i = 0; i < 7; ++i ) { printf("*"); } printf("\n"); ...
a cheat for ps3 is to unlock everything is at the main menu press <, triangle, down, <, triangle, square, <, square, triangle, down, >, square, <, up, square, > please try it it really really really works i tried it u kno how sum people lie I'm not caus its stupid so try it please this sign is over p.s print this page or write it down to save paper
The three stars that make up The Summer Triangle are: Vega, Altair, and Deneb.Look below at Sources and related links to see the stars and constellations of The Summer Triangle.
The three stars are Sirius, Betelgeuse and Procyon.
digestion
See related link for a star map
No.
Sterne
Triangles. It's all triangles. Look up at night and pick out any three stars. They will be in a triangle.