Skip to content

Instantly share code, notes, and snippets.

@mischief
Forked from anonymous/AirAndVolume.cpp
Created June 27, 2012 02:33
Show Gist options
  • Save mischief/3000967 to your computer and use it in GitHub Desktop.
Save mischief/3000967 to your computer and use it in GitHub Desktop.
Calculater switch statement
#include <iostream>
#include "AirAndVolume.h"
int cubestuff(void) {
AirAndVolume Cube;
}
int case2stuff(void) {
// test a;
}
int main(int argc, char *argv[]) {
using std::cout, std::cin, std::endl;
while(1) {
int chois;
cout << " ----- CalculatorV -----" << endl << endl << endl << endl;
cout << " ~Volumes et Aires~\n\n1) Cube/Rectangle 2) Triangle\n3) Cylindre 4) Pyramide\n5) Cone 6) Sphere / Demi Sphere\n\n";
cout << "Select a option with the number of the option :";
cin >> chois;
switch(chois) {
case 1:
cubestuff();
break;
case 2:
case2stuff();
break;
default:
cout << "Unknow chois" << endl;
}
} /* ! while(1) */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment