3 10 5 60 100 10 10 20 10 10
YES NO NO
MAIN CODE : Here I have used input array of string type which will contain all the inputs of one line as a string
for(j = 0; j < test_cases; j++) { stringstream ss; ss << input[j]; ss >> no_of_friends; ss << input[j]; ss >> each_burger; ss << input[j]; ss >> money; ss << ""; if(each_burger*no_of_friends<money) cout<<"YES"<<endl; else cout<<"NO"<<endl; }
ss << input[j]; ss >> money;
60100
int testCases; cin >> testCases; for (int i = 0; i < testCases; ++i) { int friends, rate, money; cin >> friends; cin >> rate; cin >> money; // perform calculations here }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)