#include"main.h"
int i;
int sum=0;
void main()
{
char choice;
printf("enter E-->even O-->odd");
choice=getch();
choice=toupper(choice);
if(choice=='E')
{
void even();
getch();
}
else if (choice=='O')
{
void odd();
getch();
}
else
{
printf("choice is wrong");
}}
void even()
{
for (i=0;i<100;i+=2)
{
sum+=i;
}
printf( "\n%4d %4d",i-2,sum);
}
void odd()
{
for(i=1;i<100;i+=2)
{
sum+=i;
}
printf("\n%4d %4d",i-2,sum);
}
IF any body knows pls tell....if i run i can 't able to get any output..but it does not give any error....