Tuesday, 30 July 2013

Chapter 3 solutions Problem [E][g]

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;
}


No comments:

Post a Comment