Q.1: Write a program to print fallowing shape.
#include<stdio.h>
#include<conio.h>
void main()
{
int r, v;
clrscr();
for(r=1; r<=5; r++)
{
for(v=1; v<=l; v++)
printf(" * ");
printf("\n");
}
getch();
}
Q:2: Write a program to print fallowing shape.
#include<stdio.h>
#include<conio.h>
void main()
{
int r, v;
clrscr();
for(r=1; r<=5; r++)
{
for(v=1; v<=l; v++)
printf("%d", v);
printf("\n");
}
getch();
}
Q.3: Write a program to print fallowing shape.
Ans.
#include<stdio.h>
#include<conio.h>
void main()
{
int r, v;
clrscr();
for(r=1; r<=5; r++)
{
for(v=l; v<=r; v++)
printf("%d", r);
printf("\n");
}
getch();
}
Q.4: Write a program to print fallowing shape.
Ans.
#include<stdio.h>
void main()
{
int r, v;
clrscr();
for(r=1; r<=5; r++)
{
for(v=r; v>=1; v--)
printf("%d", v);
printf("\n");
}
getch();
}
Q.5: Write a program to print fallowing shape.
#include<stdio.h>
#include<conio.h>
void main()
{
int r, v;
clrscr();
for(r=5; r>=1; r--)
{
for(v=5; v>=r; v--)
printf("%d",v);
printf("\n");
}
getch();
}
Q.6: Write a program to print fallowing shape.
Ans.
#include<stdio.h>
#include<conio.h>
void main()
{
int r, v;
clrscr();
for(r=5; r>=1; r--)
{
for(v=r; v<=5; v++)
printf(" %d", v);
printf("\n");
}
getch();
}
Q.7: Write a program to print the fallowing shape.
Ans.
#include<stdio.h>
#include<conio.h>
void main()
{
int r, v;
clrscr();
for(r=65; r<=69; r++)
{
for(v=65; v<=r; v++)
printf(" %c", v);
printf("\n");
}
getch();
}
Q.8: Write a program to print fallowing shape.
Ans.
#include<conio.h>
void main()
{
int r, v;
clrscr();
for(r=69; r>=65; r--)
{
for(v=69; v>=r; v--)
printf(" %d", v);
printf("\n");
}
printf("\n");
}
getch();
}
}
Q.9: Write a program to print fallowing shape.
Ans.
#include<stdio.h>#include<conio.h>
void mian()
{
int r, v;
clrscr();
for(r=69; r>=65; r--)
{
for(v=r; v<=69; v++)
printf(" %c", v);
printf("\n");
}
getch();
}
Q.10: Write a program to print fallowing shape.
Ans.
#include<stdio.h>
#include<conio.h>
void main()
{
int r, v;
clrscr();
for(r=5; r>=1; r--)
{
for(v=1; v<=r; v++)
printf(" %d", v);
printf("\n");
}
getch();
}
Q.11: Write a program to print the fallowing shape.
Ans.
#include<stdio.h>
#include<conio.h>
void main()
{
int r, v;
clrscr();
for(r=1; r<=5; r++)
{
for(v=5; v>=r; v--)
printf(" %d",v);
printf("\n");
}
getch();
}
Q.12: Write a program to print the fallowing shape.
Ans.
#include<stdio.h>
#include<conio.h>
void main()
{
int r, v;
clrscr();
for(r=65; r<=69; r++)
{
for(v=r; v<=69; v++)
printf(" %c", v);
printf("\n");
}
getch();
}
Q.13: Write a program to print the fallowing shape.
Ans.
#include<stdio.h>
#include<conio.h>
void main()
{
int r, v, s;
clrscr();
for(r=1; r<=5; r++)
{
for(s=1; s<=5-r; s++)
printf(" "); /* It contain double space value*/
for(v=1; v<=r; v++)
printf(" *"); /* Before '*' 'one' space value */
printf("\n");
}
getch();
}
Q.14: Write a program to print the fallowing shape.
#include<stdio.h>
#include<conio.h>
void main()
{
int r, v, s;
clrscr();
for(r=1; r<=5; r++)
{
for(s=1; s<=5-r; s++)
printf(" "); /* It contain double space value */
for(v=1; v<=r; v++)
printf(" %d", v); /* Before '%d' one space value */
printf("\n");
}
getch();
}
Q.15: Write a program to print the fallowing shape.
Ans.
#include<stdio.h>
void main(){
int r, s, v;
clrscr();
for (r = 1; r <= 5; r++)
{
for(s = 1; s<=5-r; s++)
printf(" "); /* It contain double space value */
for(v = r; v>=1; v--)
printf(" %d", v); /* Before '%d' 'one' space value */
printf("\n");
}
getch();
return 0;
}
Q.16: Write a program to print the fallowing shape.
Ans.
#include <stdio.h>
#include <conio.h>
void main()
{
clrscr();
for(r=5; r>=1; r--)
{
for(s=1; s<=r-1; s++)
printf(" ");
for(v=5; v>=r; v--)
printf(" %d", v);
printf("\n");
}
getch();
}
Q.17: Write a program to print the fallowing shape.
Ans.
#include <stdio.h>
#include <conio.h>
void main()
int r, v, s;
clrscr();
for(r=5; r>=1; r--)
{
for(s=1; s<=r-1; s++)
printf(" ");
for(v=r; v<=5; v++)
printf(" %d", v);
printf("\n");
}
getch();
}
Q.18: Write a program to print the fallowing shape.
Ans.
#include <stdio.h>
#include <conio.h>
{
int r, v, s;
clrscr();
for(r=65; r<=69; r++)
{
for(s=65; s<=r-60; s++)
printf(" ");
for(v=65; v<=r; v++)
printf("%c", v);
printf("\n");
}
getch();
1 Comments
WOW NICE SIR . ITS WORK PROPERLY.
ReplyDelete