My first code

its really simple, i call it the lol calculator. here is the code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <iostream>
using namespace std;
int a;
int main(){
    
    int b;
    int c;
    int d;
    
    cout << "enter a number: ";
    cin >> a;
    
    cout << "enter a second number: ";
    cin >> b;
    
    c=a*b-a;
    
    cout << "the sum is: " << c << "\n";
    if (c>100){
               cout << "what the fuck? enter another number: ";
               cin >> d;
               cout << "you wrote: " << d << "\n";
               system ("pause");
    }else{
          cout << "you lose bitch \n";
          system ("pause");
          }
}

I took the code i made during a tutorial and expanded upon it. i made it in Dev-C++.
Last edited on
Topic archived. No new replies allowed.