Correct Programs , Easiest Way , Interactive Discussions , Problem Solving , Innovation and that's all we are......Learn with the best , Advanced 'c' online research & discussion forum on c language.
Showing posts with label FUN WITH C. Show all posts
Showing posts with label FUN WITH C. Show all posts
Friday, September 9, 2011
Sunday, August 28, 2011
Finding a number is even or odd without using arithmatic operators
#include < stdio.h >
main()
{
int i,j; /*int type variables*/
scanf("%d",&i);/*read i value*/
j=i&1; /*perform logical AND operation */
if(j==0)
printf("even");
else
printf("odd");
}
Math is Fun Games
main()
{
int i,j; /*int type variables*/
scanf("%d",&i);/*read i value*/
j=i&1; /*perform logical AND operation */
if(j==0)
printf("even");
else
printf("odd");
}
Math is Fun Games
Saturday, August 20, 2011
I AM AN IDIOT.
#include "stdio.h"
#include "conio.h"
void main()
{char ch[]="I AM AN IDIOT.";
char c='A';
int i=0;
while(c)
{
c=getch();
printf("%c\a",ch[i]);
i++;
if(i==14)
{printf(" "); i=0;
}
}
}
Subscribe to:
Posts (Atom)