Home
About Us
Privacy Policy
Disclaimer
Contact Us
Breaking News
Home-icon
Web Development
_JavaScript
_php
Computer
_DLD
English
_Functional English
Programing
_JavaScript
_php
_Java
_C
Mega Menu
Home
programing
Even Odd using switch in C
Even Odd using switch in C
by -
Brain Light
on -
April 01, 2018
#include <stdio.h>
int main()
{
int i,n;
printf("enter anumber:\n");
scanf("%d",&n);
for(i=1;i<n;i=i+1)
{
switch(i%2)
{
case 0:
printf("The number %d is even:",i);
break;
case 1:
printf("The number %d is odd:",i);
break;
}
}
return 0;
}
Post a Comment
0 Comments
Social Plugin
Popular Posts
Introduction to PHP (lecture 1)
September 03, 2018
Super Key words (lecture 9)
July 07, 2018
logic gates and truth tables in dld
July 10, 2018
Facebook
Powered by Blogger
0 Comments
Your Comment is Submitted