Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Finder File Edit View Go Window Help Ocs150-2337 x D MobilePhotou x-DCS 150 (69

ID: 3872715 • Letter: F

Question

Finder File Edit View Go Window Help Ocs150-2337 x D MobilePhotou x-DCS 150 (69 u xi D cho2-Variable X" Dcs501DE x YI, cs 150-c+-x-e //processings x tavi C à Secure | https://ide.cs50.io/soctavio98/.de50#openfile-x Screen Shot 2017-09-...08.41 PM C$50 IDE File Edit Find View Go Window cs150 11 string STUDENT = "soctavio". // Add your Canvas login nome 12 extern string ASSIGNMENT 13 Screen Shot 2017-09-…08.02 PM 15 16 the purpose of this program is to show what prizes you can get with the amount of points you get from redeem cuopons 17 ereturn for success 18 19 int run) 102 h02.app h02.0 21 input: title and number of coupons to redeem output:shows the amount of coupons you typed and what coupons awards you can get from the amount you typed given:for 10 coupons 1 full length downlood current feature film, 3 coupons-downlood half hour episode 1968 classic old rerun televison show processing-films coupons 18, 23 ibh02.a 26 27 28 Screen Shot 2017-07-.. 27.44 PM / title cout

Explanation / Answer

// You have asked for complete code . So complete code is as below

#include <iostream>

using namespace std;

string STUDENT = "soctovio";

//extern string ASSIGNMENT;

int run(){

//title

cout<<STUDENT<< "-"<<" :";

cout<<" Angry Nerds "<<endl;

cout<<string(50, '-')<<endl;

//Input

cout<<"No of coupons to redeem"<<endl;

int coupons;

cin>>coupons;

// Processing Section

int films = coupons / 10;

int leftovers = coupons %10;

int sitcoms = leftovers/3;

// finally you have to take the remainder of leftover by 3 and assign to itself

leftovers = leftovers % 3;

//output

cout<<"With "<<coupons<< " you can watch the following. "

<<"Films , sitcoms, leftover coupons [ "<<films<<", "<<sitcoms<<" , "<<leftovers<<" ]"<<endl;

return 0;

}

int main(){

run();

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote