how to call back a functiom using swtich statement in c++

#include <iostream.h>
#include <conio.h>
int func(int M)
switch (int M)
{
case 1 (M>=100):
grade=4;
break;
default:
grade=0;
return grade;
}
void main()
{
int cal,gcal;
cout<<"Enter the markx of Calculus"<<endl;
cin>>cal;
gcal=int func(int cal);

getch();
}





Last edited on
Nice code!
The only thing I can think of to make it better would be code tags!
Topic archived. No new replies allowed.