Question-Write a program to fill the entire screen with diamond and
heart alternatively. The ASCII value for heart is 3 and that of
diamond is 4.
Solution-
Easy one. here is it's solution.
#include<stdio.h>
int main()
{
int ch=3,c=4,i;
for(i=1;i<2000;i++)
printf("%c%c",ch,c);
return 0;
}
heart alternatively. The ASCII value for heart is 3 and that of
diamond is 4.
Solution-
Easy one. here is it's solution.
#include<stdio.h>
int main()
{
int ch=3,c=4,i;
for(i=1;i<2000;i++)
printf("%c%c",ch,c);
return 0;
}
No comments:
Post a Comment