Monday, September 1, 2014

print hearts and faces on the entire screen using loops


Write the program to fill the entire screen by printing smiling face and heart alternatively. The smiling face has an ASCI value 1and heart has 3.

Code

#include<stdio.h>
int main()
{
int i,x,y;
x=1;
y=3;
i=1;
while(i<=1000)
{
printf("%c%c",x,y);
i=i+1;
}
system("pause");
return 0;
}

Sample Output

print face/heart c language

No comments :

Post a Comment

Note: Only a member of this blog may post a comment.

Copyright 2017. All Rights Reserved. Privacy Policy / Terms And Conditions / Sitemap / Contact