ok to really surprise my mom im doing all the basic windows
application (dont ask wut)
ok now im having a problem with the calculator
Code:#include<iostream> using namespace std; int main() { int x; int y; int input; do{ cout<<"1. multiply\n"; cout<<"2. devide\n"; cout<<"3. addition\n"; cout<<"4. subtraction\n"; cout<<"5. percentage\n"; cout<<"6. cos&sin\n"; cout<<"please provide the number listed\n"; cin>> input; switch ( input ) { case 1: cout<<"please provide 2 numbers to be multiplied\n"; cin>> x >> y ; cin.ignore(); cout<<( x*y ); cin.get(); break; case 2: cout<<"please provide 2 numbers to be devided\n"; cin>> x >> y ; cin.ignore(); cout<<( x/y ); cin.get(); break; case 3: cout<<"pls provide 2 numbers to be added\n"; cin>> x >> y ; cin.ignore(); cout<<( x+y ); cin.get(); break; case 4: cout<<"pls provide 2 numbers to be subtracted\n"; cin>> x >> y ; cin.ignore(); cout<<( x-y ); cin.get(); break; case 5: cout<<"pls provide 2 numbers to percented\n"; cin>> x >> y ; cin.ignore(); cout<<( x%y ); cin.get(); break; case 6: cout<<"pls provide 2 numbers to be cos\n"; cin>> x >> y ; cin.ignore(); cout<<( cos(x, y ); cin.get(); break; } }while(input!=4); }
but how do i do cos i dont get it