#include<stdio.h>
void main()
{
int i,j,k,n;
printf("Enter the value of n: ");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
for(k=1;k<=n-i;k++)
printf(" ");
for(j=1;j<=2*i-1;j++)
{
printf("*");
}
printf("\n");
}
}
it so simple
#include<stdio.h>
#include<conio.h>
main()
{
int i,j ,n;
clrscr();
printf("enter the any no");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
for(j=1;j<=i;j++)
{
printf("*");
}
printf("\n");
}
getch();
}
any another quary mail me on mohd.yameen786.@Yahoo.com
Sample code is as follows:
#include <stdio.h>
void main()
{
int i = 0, j = 0, k =0;
int p_size = 0, dummy = 0;
printf("Exter the Size of Pyramid \n");
scanf("%d", &p_size);
dummy = p_size;
for(i = 0; i < dummy; i++)
{
printf("\n");
for(j = 0; j < p_size ; j++)
printf(" ");
for(k = 0; k < i; k++)
printf("%d ",i);
p_size--;
}
}
#includeint main(){static int ROWS = 6;char ch;printf("Please enter an UPPERCASE letter:");scanf("%c",&ch);for( int row = 0; row < ROWS; ++row ){// Print padding.for( int column = 1; column < ROWS - row; ++column)printf(" ");// Print letters left of centre.for( int letter = row; letter >= 1; --letter)printf("%c", ch);// Print centre letter.printf("%c", ch);// print letters right of centre.for( int letter = row; letter >= 1; --letter)printf("%c", ch);printf("\n");}return( 0 );}
You will have to use "printf" when you want to print two slashes one after another in c.
Copyright
printf ("initials");
%%c %%D %%DIA c%%
123454321
C++ has no print option. The print option in your IDE allows you to print your C++ source code, thus giving you a "hard" copy of your code.
C. Pyramid of the Sun
The first pyramid was the stepped pyramid of Zoser. It can be seen in Saqqara, Egypt. It was built c.4770 years ago. The first smooth-faced pyramid was built for Snefru in c. 2620BC.
The earliest known Pyramid is the step pyramid at Saqarra built for the pharaoh Djoser c.2600BC
The Step Pyramid of king Djoser c.2900BC at Saqqara
#includeint main(){static int ROWS = 6;char ch;printf("Please enter an UPPERCASE letter:");scanf("%c",&ch);for( int row = 0; row < ROWS; ++row ){// Print padding.for( int column = 1; column < ROWS - row; ++column)printf(" ");// Print letters left of centre.for( int letter = row; letter >= 1; --letter)printf("%c", ch);// Print centre letter.printf("%c", ch);// print letters right of centre.for( int letter = row; letter >= 1; --letter)printf("%c", ch);printf("\n");}return( 0 );}
A C-print or Type C-print is a color print from a color negative. The term "Type C" is generally used to distinguish from R or Reversal prints or direct positive prints from transparencies (color positives). Type C prints can also be made digitally. Type C is probably the most common form of color print.
No it was not the first pyramid was the Step Pyramid of the 3rd dynasty Pharaoh Djoser built c.2650BC at Saqqara.
write a c++ programe to print a triangle without (for)
printf(format_string, ...);
# include<stdio.h> main() { int a,b,c; print f("enter the values of a,b,c"); scan f("%d%d%d",&a,&b,&c); if((a>b)&&(a>c)) print f("Greatest value is a =%d",a); else if((b>a)&&(b>c)) print f("Greatest value is b=%d",b); else print f("Greatest value is c=%d",c); }