- 3

C++ not an issue

#include<iostream> using namespace std; int main() { cout << "what is 7+8 if you give correct answer you will get 100 rupees\n"; cout << "if you lose you will give me 10 ruppes\n"; int num; cin >> num; cout << num + 2; if(num>100) { cout << "true" << endl; } else{ cout << "your maths is week" << endl; } return 0; } This code is already working I just want to know how I can add random questions here With there answers

12th Jun 2022, 5:14 PM
Atharv Dwivedi
Atharv Dwivedi - avatar
1 ответ
+ 1
Do you mean that you'd like the question in your code to be random each time you run it?
12th Jun 2022, 7:47 PM
Apollo-Roboto
Apollo-Roboto - avatar