Professional Documents
Culture Documents
Object: To Print The ASCII Codes of All The Alphapets. Source Code
Object: To Print The ASCII Codes of All The Alphapets. Source Code
Object: To Print The ASCII Codes of All The Alphapets. Source Code
No#4497
for(a=65;a<=90;a++)
getch();
}
Output:
//M.Babar//
//F.No. 4497//
//To print the Volume of the Cylinder//
#include<stdio.h>
#include<conio.h>
void main(void)
{
float radius,height,volume;
radius=2.5;
height=16.0;
volume=3.14216*radius*radius*height;
printf("The volume of cylinder is: %.2f ",volume);
getch();
}
Output:
A=Pi*R*R;
printf("The circumference if the circle is %.2f",A);
getch();
}
Output:
Output:
Output:
for(rows=1;rows<=3;rows++)
{
for(cols=1;cols<=3;cols++)
printf("*");
printf("\n");
}
getch();
}
Output:
for(rows=1;rows<=3;rows++)
{
for(space=1;space<rows;space++)
printf(" ");
for(cols=3;cols>=rows;cols--)
printf("*");
printf("\n");
}
getch();
}
Output:
#include<stdio.h>
#include<conio.h>
void main(void)
{
int rows,cols,i,var=0;
clrscr();
for(rows=1;rows<=3;rows++)
{
for(cols=3;cols>=rows;cols--)
printf("*");
for(i=1;i<=var;i++)
printf(" ");
for(cols=3;cols>=rows;cols--)
printf("*");
printf("\n");
var+=2;
}
getch();
}
Output:
Output:
#include<stdio.h>
#include<conio.h>
void main(void)
{
int rows,cols,space,var=0;
clrscr();
rows=1;
while(rows<=3)
{
cols=3;
while(cols>=rows)
printf("*",cols--);
space=1;
while(space<=var)
printf(" ",space++);
cols=3;
while(cols>=rows)
printf("*",cols--);
printf("\n");
var+=2;
rows++;
}
getch();
}
Output: