Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <windows.h>
- using namespace std;
- //-------------;
- //-------------;
- void Calculator()
- {
- int num1, num2;
- char op;
- int result;
- cout << "Enter First Number: "<< endl;
- cin >> num1;
- cout << "Enter Operator: "<< endl;
- cin >> op ;
- cout << "Enter Second Number: "<< endl;
- cin >> num2;
- if (op == '+'){
- result = num1 + num2;
- }else if(op == '-'){
- result = num1 - num2;
- }else if(op == '/'){
- result = num1 / num2;
- }else if(op == '*'){
- result = num1 * num2;
- }else{
- result = 0;
- }
- if (result == 0)
- {
- cout << "Invalid Operator"<< endl;
- }else if (result != 0){
- cout << "Answer: "<< result << endl;
- }
- }
- //------------------------------;
- //-------------;
- int main(int argc, char* argv[])
- {
- star:
- cout << "What Do You Want To Do?"<< endl;
- cout << "Autoclicker"<< endl;
- cout << "Calculator"<< endl;
- string What;
- cin >> What;
- if (What == "Autoclicker")
- {
- int n = 1;
- int x;
- int y;
- int times;
- int done;
- int sleepy;
- string choice;
- cout<<"Autoclicker Version 1.0" << endl;
- cout << " "<< endl;
- cout << "How many times do you wish to click?"<<endl;
- cout << ":";
- cin >> times;
- cout << "How much time should there be between clicks?(Milliseconds)" << endl;
- cout << "(MS)";
- cin >> sleepy;
- done = 0;
- cout << "Starting in 5 seconds..."<< endl;
- Sleep(1000);
- cout << "Starting in 4 seconds..."<< endl;
- Sleep(1000);
- cout << "Starting in 3 seconds..."<< endl;
- Sleep(1000);
- cout << "Starting in 2 seconds..."<< endl;
- Sleep(1000);
- cout << "Starting in 1 seconds..."<< endl;
- Sleep(1000);
- while (done <= times)
- {
- Sleep(sleepy);
- mouse_event(MOUSEEVENTF_LEFTDOWN,x,y,0,0);
- mouse_event(MOUSEEVENTF_LEFTUP,x,y,0,0);
- done++;
- }
- cout << "Autoclicker has finished." <<endl;
- cout << "Again? (y) or (n)" << endl;
- cin >> choice;
- if (choice == "y")
- {
- system("cls");
- }else{
- goto star;
- }
- }
- if (What == "Calculator")
- {
- Calculator();
- Sleep(1200);
- goto star;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment