Radical Developers welcomes all the visitors to be a member of the team. Come join us. Its all about open-source concept. All Programs are written and tested in MacOS X, Unix, Linux and may not match with the outputs of Turbo C++ in Windows
Showing posts with label Switch-Case (C). Show all posts
Showing posts with label Switch-Case (C). Show all posts

Sunday, January 9, 2011

Write a menu driven program which has the following options: (1) Factorial of a Number (2) Prime or not (3) Odd or even (4) Exit. [Make use of Switch Statement]


Source Code :

#include<stdio.h>
void main()
{
      int n,ch,i,fl=0,fact=1;
      clrscr();
      printf("\n1. Factorial of a Number");