+ 1

(SOLVED)Argentina code coach

This is the problem! It works for only 4 of 5! I need some help! Anyone? #include <iostream> using namespace std; int main() { int USD; int AP = USD * 50; USD = AP / 50; cin>>USD; cin>>AP; if(USD < AP){ cout<<"Pesos"; }else{ cout<<"Dollars"; } cin.ignore(); cin.get(); return 0; }

14th Feb 2021, 5:15 PM
Barbu Vulc
Barbu Vulc - avatar
8 Answers
+ 8
Barbu Vulc , i took your code and just rearranged the input. see also the conditional expression in the if clause. i also removed some lines of code at the end of the program, which are not necessary: https://code.sololearn.com/ccYb31TIJ0ee/?ref=app
14th Feb 2021, 6:26 PM
Lothar
Lothar - avatar
+ 3
You are welcome Barbu Vulc . Now I can show you how I it solved in the code coach task: https://code.sololearn.com/cxWIWaTBfr7l/?ref=app
14th Feb 2021, 8:29 PM
JaScript
JaScript - avatar
+ 2
First input is pesos and the second usd. There will be needed to calculate with double numbers.
14th Feb 2021, 5:45 PM
JaScript
JaScript - avatar
+ 2
JaScript I'm so stupid! I forgot that I can put "AP / 50" inside the If clause.
14th Feb 2021, 6:32 PM
Barbu Vulc
Barbu Vulc - avatar
+ 1
JaScript so, something like this: double AP; double USD; ?
14th Feb 2021, 6:20 PM
Barbu Vulc
Barbu Vulc - avatar
+ 1
JaScript Thanks! đŸ€—
14th Feb 2021, 6:27 PM
Barbu Vulc
Barbu Vulc - avatar
0
1. Generate L carner's online feedback form of NPTEL using feedback button on the course code which prescribes the quality of online course learner by these parameters such as active attendance hours (1. 10 10), number of queries (1...10/10), immediate time of responses (1...10. 10). proper assignment submissions(1.10/10) using python web framework to submit this score to the corresponding client userID using SMTP, and raise the exception if any invalid records are accessed. Inputs: Course Model (courseCode courseName) Leamer Model (userlD, class, No Of Query, Response Time. SubmissionDate) Expected Output: Total Score value of given user ID and courseCode or Invalid ID exception
15th Feb 2021, 9:03 AM
SASHANK
SASHANK - avatar
0
Can u solve that problem
15th Feb 2021, 9:04 AM
SASHANK
SASHANK - avatar