cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Windows Programming
how to call back a functiom using swtich
how to call back a functiom using swtich statement in c++
Nov 22, 2010 at 11:10am UTC
atiqa03
(1)
#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
Nov 22, 2010 at 11:15am UTC
Nov 22, 2010 at 12:56pm UTC
Bazzy
(6281)
Nice code!
Nov 23, 2010 at 12:05am UTC
freddie1
(1838)
The only thing I can think of to make it better would be code tags!
Topic archived. No new replies allowed.