Blog

Coursehelp
February 6, 2019
QUESTION : No Comments

A local government is considering promoting tourism in the city. It will cost $5,

A local government is considering promoting tourism in the city. It will cost $5,000 to develop the plan. The anticipated annual benefits and costs are as follows: Annual benefits: Increased local income and tax collections $117,400 Annual support service: parking lot expansion, rest room, patrol car, and street repair $48,830 If the city government uses a discount rate of 6% and a study period of 5 years, is this tourism project justifiable according to the benefit cost analysis?

Expert Answer

The problem is solved by finding the future value . . .

OR
OR

Have a Comment on this Question?

Questions viewed by other students


  • QUESTION : (Solved) : Code Searching Txt File Displaying Information Correctly Found Show Wrong Code Show Code O Q32043497 . . .

    I have this code but it is not searching the .txt file anddisplaying the information correctly when found. Can you show mewhat is wrong with this code. Can you show your code and output.You can use your own .txt file.

    #include

    #include

    #include

    using namespace std;

    string fname[25];

    string lname[30];

    string email[25];

    struct menu{

    char filename[60];

    char menu;

      

    };

    class menuclass{

      

    public:

      

    void menu();

      

    void display();

      

    void displayall(){

      

    for(int i =0; i<1; i++){

      

    cout<<“First name:”<

      

    cout<<“Last name:”<

      

    cout<<“email:”<

      

    }

      

    }

      

      

    // Function to perform loading the data of file into arrays

      

    void loadFile(){

      

    ifstream infile;

    infile.open(” menu.txt”, ios :: in);

    string line;//for read line

      

    cout<<“Loading the file……..”<< endl;

      

    //open the below file

      

    infile.open (“MyList.txt”);

      

    int counter=0;

      

    if (infile.is_open()){ //if file opened

    while( getline(infile, line,’n’) ) { //get row from textfile

    cout <

    string firstName,lastName;

      

    stringstream ss(line); //stream to other variable

      

    ss>>fname[counter]>>lname[counter]>>email[counter];

      

    counter++;

      

    }

      

    infile.close(); //close file

    cout<

    cout<<“File scan done……..”<< endl;

      

    }

      

    else{ //if file not found show the below message

      

    cout << “Sorry, we could not find the file.” <<endl;

    }

      

    }

    ifstream infile ;

    // Function to perform search based on first name

      

    void searchbyFirstName(string first_name){

      

    // Function to perform search based on first name

      

    for(int i =0; i<1; i++){

      

    if(first_name ==fname[i]){

      

    cout<<“**Found The following with matching first name**n”;

    cout<<“First name:”<

      

    }

      

    else{

      

    cout<<“Not found”;

      

    }

      

    }

      

    }

      

    // Function to perform search based on first name

      

    void searchbyastName(string lastname){

      

    // Function to perform search based on first name

      

    for(int i =0; i<1; i++){

      

    if(lastname ==lname[i]){

      

    cout<<“**Found The following details with matching lastname** n”;

    cout<<“First name:”<

    cout <<“displayall”<

      

    }

      

    else{

      

    cout<<“Not found”;

      

    }

      

    }

      

    }

      

    // Function to perform search based on first name

      

    void searchByNumber(int number){

      

    number = number-1; // get actual array index

      

    // Check for row number validity

      

    if(number<= 1 && number >0){

      

    cout<<“**Found The following details ** n”;

      

    cout<<“First name:”<

      

    cout<<“Last name:”<

      

    cout<<“email:”<

      

    }

      

    else{

      

    cout<<“Invalid number”;

      

    }

      

    }

      

    };

    int main (){

      

    int menu1=0;

    char repeat=’Y’/’N’;

    string y;

    string input;

    string occurrences;

    char word;

    int done=0;

    string read;

    string fname,lname;

      

    string search;

      

    string enter;

      

    string line;

    string str[500];

    int number;

      

    //Create an object of your menuclass

      

    menuclass menuclass ;

      

    do{

      

    cout << “Please pick one of the following Choices”<< endl;

      

    cout << “1)” << ” Displlayall ” << endl;

      

    cout << “2)” << “search fnamer” << endl;

      

    cout << “3)” << “search lname ” << endl;

      

    cout << “4)” << “search number” << endl;

      

    cout << “5)” << “water ” << endl;

    cin >> menu1;

    cout <<“end”<

      

    // Load the file data

      

    menuclass.loadFile();

      

    switch (menu1){

      

    case 1:

      

    cout << “displayall”<< endl;

      

    // call the displayall function

      

    menuclass.displayall();

      

    break;

      

    case 2:

      

    cout << “Search by first name” << endl;

      

    cin >> enter;

    getline(cin,fname);

    // call the searchByFirstName function   

    menuclass.searchbyFirstName(enter);

      

    break;

      

    case 3:

      

    cout << “Search by last name” << endl;

      

    cin >> enter;

    // This call function will search by userLastName

    menuclass.searchbyLastName(enter);

    break;

    default:

    cout <<“not valid”<< endl;

    for( menu1 = 0; menu1 <1; menu1++ )

    getline(cin,enter);

    }

    //calculator stuff, better to be in a separate function

    cout << “nDo you want to continue (Y/N)?n”;

    cout << “You must type a ‘Y’ or an ‘N’ :”

    cin >> repeat;

    for(int i =0; i<1; ++i){

    cout <<“display “<

    }

    }

    while ((repeat == ‘Y’) || (repeat == ‘y’));

    return 0;

    }

    Expert Answer


    . . .


    view full answer
  • QUESTION : (Solved) : Code Script File Outdoordbv4sql Drop Table Orderdetails Drop Table Productorder Drop Table Q35339021 . . .

    Here is the code for the script file outdoorDB_v4.sql

    drop table order_details;
    drop table product_order;
    drop table club_membership;
    drop table purchase_order;
    drop table product;
    drop table customer;
    drop table club_activity;
    drop table sporting_clubs;
    drop table supplier;

    drop sequence club_sequence;
    drop sequence product_id_sequence;
    drop sequence customer_sequence;
    drop sequence membership_sequence;
    drop sequence product_order_sequence;
    drop sequence supplier_sequence;
    drop sequence po_sequence;

    create table sporting_clubs
    (club_id number(3)constraint sporting_clubs_pk primary key,
    name varchar2(30),
    street varchar2(30),
    city varchar2(15),
    state char(2),
    zip number(5),
    phone varchar2(10));

    create table club_activity
    (club_id number(3)constraint club_activity_fk referencessporting_clubs,
    activity varchar2(15),
    constraint club_activity_pk primary key (club_id,activity));

    create table supplier
    (supplier_id varchar2(4) constraint supplier_pk primary key,
    name varchar2(30),
    street varchar2(30),
    city varchar2(15),
    state char(2),
    zip number(5),
    phone varchar2(10));

    create table product
    (product_id number(5) constraint product_pk primary key,
    product_name varchar2(30),
    quantity_in_stock number(3),
    reorder_point number(2),
    price number(5,2),
    supplier_id varchar2(4) constraint product_fk referencessupplier,
    reorder_qty number(2));

    create table purchase_order
    (po_no varchar2(4) constraint purchase_order_pk primary key,
    po_date date,
    product_id number(5) constraint purchase_order_fk1 referencesproduct,
    quantity number(3),
    supplier_id varchar2(4) constraint purchase_order_fk2 referencessupplier);

    create table customer
    (customer_id number(3) constraint customer_pk primary key,
    first_name varchar2(10),
    last_name varchar2(10),
    street varchar2(30),
    city varchar2(15),
    state char(2)default ‘MO’,
    zip number(5),
    phone varchar2(10));

    create table club_membership
    (membership_id number(5) constraint club_membership_pk primarykey,
    membership_date date,
    duration number(2),
    amount number(4),
    payment_type varchar2(5)constraint membership_payment_type_ck check((payment_type = ‘CC’) or (payment_type = ‘Check’)),
    club_id number(3) constraint club_membership_fk1 referencessporting_clubs,
    customer_id number(3) constraint club_membership_fk2 referencescustomer);

    create table product_order
    (order_id number(4) constraint product_order_pk primary key,
    order_date date,
    ship_date date,
    payment_type varchar2(5)constraint prod_order_payment_type_ck check((payment_type = ‘CC’) or (payment_type = ‘Check’)),
    total number (6,2),
    customer_id number(3) constraint product_order_fk1 referencescustomer);

    create table order_details
    (order_id number(4),
    product_id number(5),
    quantity number(2),
    constraint order_details_pk primary key(order_id,product_id),
    constraint order_details_fk1 foreign key (order_id) referencesproduct_order,
    constraint order_details_fk2 foreign key (product_id) referencesproduct);

    create sequence club_sequence
    start with 100
    increment by 10
    nocache;

    insert into sporting_clubs
    values(club_sequence.nextval, ‘Hillside Mountain Club’, ‘1 WinonaSt’,’Wichita’,’KS’,34342,’3163997676′);
    insert into sporting_clubs
    values(club_sequence.nextval, ‘Branson Climbing Club’, ‘2 SherwoodDr.’,’Branson’,’MO’,65670,’4174485676′);
    insert into sporting_clubs
    values(club_sequence.nextval, ‘Cherokee Rafting Club’, ’44 KentAve.’,’St. Charles’,’MO’,66572,’3147780870′);
    insert into sporting_clubs
    values(club_sequence.nextval, ‘White Plains Club’, ‘225 TracySt.’,’New York’,’NY’,13567,’2126678090′);

    insert into club_activity
    values(100,’Hiking’);
    insert into club_activity
    values(100,’Climbing’);
    insert into club_activity
    values(100,’Walking’);
    insert into club_activity
    values(110,’Hiking’);
    insert into club_activity
    values(110,’Climbing’);
    insert into club_activity
    values(110,’Conservation’);
    insert into club_activity
    values(110,’Walking’);
    insert into club_activity
    values(120,’Conservation’);
    insert into club_activity
    values(120,’Canoeing’);
    insert into club_activity
    values(130,’Conservation’);
    insert into club_activity
    values(130,’Canoeing’);
    insert into club_activity
    values(130,’Walking’);

    create sequence supplier_sequence
    start with 500
    increment by 10
    nocache;

    insert into supplier
    values(‘S’||supplier_sequence.nextval,’Hillside Ski’,’2717 S.Western Ave.’,’Los Angeles’,’CA’,90006,’7146654959′);
    insert into supplier
    values(‘S’||supplier_sequence.nextval,’Tiger Mountain’,’2600 S.Vermont Ave.’,’Los Angeles’,’CA’,90006,’7143327878′);
    insert into supplier
    values(‘S’||supplier_sequence.nextval,’Asha Outdoor’,’44 S. LaSalleSt.’,’Chicago’,’IL’,60603,’3125554678′);
    insert into supplier
    values(‘S’||supplier_sequence.nextval,’Sheraton Recreation’,’225Tracy St.’,’New York’,’NY’,13567,’2128889569′);

    create sequence product_id_sequence
    start with 10010
    increment by 1
    nocache;

    insert into product
    values(product_id_sequence.nextval,’Beginner”s SkiBoot’,20,5,9.75,’S500′,25);
    insert into product
    values(product_id_sequence.nextval,’Intermediate SkiBoot’,18,5,12.99,’S500′,20);
    insert into product
    values(product_id_sequence.nextval,’Pro SkiBoot’,21,7,15.49,’S510′,25);
    insert into product
    values(product_id_sequence.nextval,’Beginner”s SkiPole’,15,3,25.49,’S500′,20);
    insert into product
    values(product_id_sequence.nextval,’Intermediate SkiPole’,20,3,29.99,’S520′,22);
    insert into product
    values(product_id_sequence.nextval,’Pro SkiPole’,21,5,34.99,’S530′,25);
    insert into product
    values(product_id_sequence.nextval,’RoadBicycle’,15,4,34.95,’S520′,18);
    insert into product
    values(product_id_sequence.nextval,’MountainBicycle’,19,4,49.99,’S520′,20);
    insert into product
    values(product_id_sequence.nextval,’TirePump’,8,2,7.99,’S530′,10);
    insert into product
    values(product_id_sequence.nextval,’WaterBottle’,25,4,2.49,’S510′,25);
    insert into product
    values(product_id_sequence.nextval,’BicycleTires’,30,5,4.99,’S500′,33);
    insert into product
    values(product_id_sequence.nextval,’BicycleHelmet’,23,6,10.95,’S510′,25);

    create sequence po_sequence
    start with 11
    nocache;

    insert into purchase_order
    values(‘PO’||po_sequence.nextval,to_date(‘5/25/08′,’mm/dd/yy’),10011,20,’S500′);
    insert into purchase_order
    values(‘PO’||po_sequence.nextval,to_date(‘5/12/08′,’mm/dd/yy’),10015,25,’S530′);
    insert into purchase_order
    values(‘PO’||po_sequence.nextval,to_date(‘6/25/08′,’mm/dd/yy’),10011,20,’S500′);
    insert into purchase_order
    values(‘PO’||po_sequence.nextval,to_date(‘6/15/08′,’mm/dd/yy’),10018,10,’S530′);
    insert into purchase_order
    values(‘PO’||po_sequence.nextval,to_date(‘7/10/08′,’mm/dd/yy’),10015,25,’S530′);
    insert into purchase_order
    values(‘PO’||po_sequence.nextval,to_date(‘7/25/08′,’mm/dd/yy’),10019,25,’S510′);

    create sequence customer_sequence
    start with 101
    nocache;

    insert into customer
    values(customer_sequence.nextval,’Jack’,’Russell’,’25 North MadisonAve.’,’Springfield’,’MO’,65807,’4178823434′);
    insert into customer
    values(customer_sequence.nextval,’Betty’,’Trumbell’,’550 SouthCourt Dr.’,’St. Louis’,’MO’,63140,’3125556670′);
    insert into customer
    values(customer_sequence.nextval,’Anil’,’Kaul’,’400 South CircleSt.’,’Kansas City’,’MO’,64530,’4316667070′);
    insert into customer
    values(customer_sequence.nextval,’Tom’,’Wiley’,’1500 North GrandSt.’,’Springfield’,’MO’,65810,’4178825560′);
    insert into customer
    values(customer_sequence.nextval,’Sharon’,’Stone’,’200 West WagnerSt.’,’Springfield’,’MO’,65807,’4176668890′);

    create sequence membership_sequence
    start with 10010
    increment by 10
    nocache;

    insert into club_membership
    values(membership_sequence.nextval,to_date(‘6/12/08′,’mm/dd/yy’),4,200,’CC’,100,101);
    insert into club_membership
    values(membership_sequence.nextval,to_date(‘6/15/08′,’mm/dd/yy’),2,100,’Check’,110,102);
    insert into club_membership
    values(membership_sequence.nextval,to_date(‘6/21/08′,’mm/dd/yy’),5,250,’Check’,120,103);

    create sequence product_order_sequence
    start with 1001
    nocache;

    insert into product_order
    values(product_order_sequence.nextval,to_date(‘5/27/08′,’mm/dd/yy’),to_date(‘6/1/08′,’mm/dd/yy’),’CC’,134.95,102);
    insert into product_order
    values(product_order_sequence.nextval,to_date(‘5/28/08′,’mm/dd/yy’),to_date(‘6/2/08′,’mm/dd/yy’),’CC’,134.85,103);
    insert into product_order
    values(product_order_sequence.nextval,to_date(‘5/28/08′,’mm/dd/yy’),to_date(‘6/3/08′,’mm/dd/yy’),’Check’,12.45,104);
    insert into product_order
    values(product_order_sequence.nextval,to_date(‘6/5/08′,’mm/dd/yy’),to_date(‘6/10/08′,’mm/dd/yy’),’CC’,44.43,105);
    insert into product_order
    values(product_order_sequence.nextval,to_date(‘6/6/08′,’mm/dd/yy’),to_date(‘6/8/08′,’mm/dd/yy’),’Check’,52.48,103);
    insert into product_order
    values(product_order_sequence.nextval,to_date(‘6/8/08′,’mm/dd/yy’),to_date(‘6/12/08′,’mm/dd/yy’),’CC’,131.94,104);

    insert into order_details values(1001,10011,2);
    insert into order_details values(1001,10015,3);
    insert into order_details values(1002,10011,5);
    insert into order_details values(1002,10016,2);
    insert into order_details values(1003,10019,5);
    insert into order_details values(1004,10018,3);
    insert into order_details values(1004,10011,1);
    insert into order_details values(1004,10019,3);
    insert into order_details values(1005,10017,1);
    insert into order_details values(1005,10019,1);
    insert into order_details values(1005,10021,1);
    insert into order_details values(1006,10012,4);
    insert into order_details values(1006,10015,2);

    commit;

    Ex5B-5. Utilize the Outdoor Clubs & Product database to add an attribute qty ordered to the product table with data type nu

    Ex5B-5. Utilize the Outdoor Clubs & Product database to add an attribute “qty ordered” to the product table with data type number(2), Now, create a procedure “ex5b add quantities” that adds the quantities that have been ordered for each product so far, and updates those values for the qty ordered attribute in the product table. For those products that do not yet have an order, the value inserted for the attribute should be zero. Atthe end of processing display the product_ id, qty_ordered values. Save the procedure source as a script file. Ex5B-8. Utilize the Outdoor Clubs & Product database to create a procedure”ex5b_supplier_update that contains two input parameters. The first input parameter is a supplier id attribute value that is used to delete the supplier from the supplier table. The second input parameter is also another supplier id attribute value that is used to update the deleted supplier entry (of the first input parameter) in the product and purchase order table with a new supplier value. Create a boolean function “ex5b supplier exist” to determine if the two input parameter supplier id attribute values exists before proceeding wth the data manipulations. If the suppliers do not exist, then display a message Invalid Suppliers. Run program unit again! Show transcribed image text

    Expert Answer


    . . .


    view full answer
  • QUESTION : (Solved) : Code Since Im Program Fundemenatal 1 Cant Use Overly Technical Codes Header Files O Precis Q30253283 . . .

    Here my code, Since im in Program Fundemenatal 1. I cant useoverly technical codes.

    // Header files for I/O,precision,time and manipulation
    #include
    #include
    #include
    #include
    #include
    #include
    using namespace std;
    //Function prototype
    void MainMenu();
    void SideMenu();
    int main()
    {
    //Variable for file read
    ifstream in;
    //Extract month for read file
    string mon,dateVal;
    //Read month sale details and calculation
    int s, m, l,totalS=0, totalM = 0, totalL = 0;
    //Input read
    int ch, s_ch, num = 0;

    //date extraction
    string str1 = “”;
    string str2 = “”;
    string str3 = “”;
    //Todays date extraction
    time_t rawtime;
    struct tm * timeinfo;
    char fileStore;
    char buffer[80];
    time(&rawtime);
    timeinfo = localtime(&rawtime);
    strftime(buffer, sizeof(buffer), “%m/%d/%Y”, timeinfo);
    std::string str(buffer);
    //for each case different cup size calculations
    int sOrderDay = 0, mOrderDay = 0, lOrderDay = 0;
    double sOrderDayPrice = 0, mOrderDayPrice = 0, lOrderDayPrice =0;
    int sOrder=0,mOrder=0,lOrder=0;
    double sOrderPrice = 0, mOrderPrice = 0, lOrderPrice = 0;
    //Call First screen menu
    MainMenu();
    cout << “Please enter you choice: “;
    cin >> ch;
    //loop check the user option
    while (ch == 0 || ch < 4) {
    switch (ch)
    {
    //If request for sale
    case 1:
    SideMenu();
    //prompt size of cup
    cout << “Please enter the size of cup: “;
    cin >>s_ch;
    //According to choice llop calculation and display
    while (s_ch == 0 || s_ch < 4) {
    //If choice 0 means done and display bill details
    if (s_ch == 0) {
    cout << “RECEIPT SALE ICE CREAM” << endl;
    cout << “Date: ” << str << endl;
    cout << “Small: ” << sOrder << ” ” <<sOrderPrice << endl;
    cout << “Medium: ” << mOrder << ” ” <<mOrderPrice<< endl;
    cout << “Large: ” << lOrder << ” ” <<lOrderPrice << endl;
    cout <<“——————————————————-” <<endl;
    cout << “SubTotal: ” < cout << “Tax(8.25%): “<< fixed << setprecision(2)<< (sOrderPrice +mOrderPrice + lOrderPrice)*.0825 << endl;
    cout << “Total: ” << fixed << setprecision(2)<< ((sOrderPrice + mOrderPrice + lOrderPrice) + ((sOrderPrice+ mOrderPrice + lOrderPrice)*.0825)) << endl;
    sOrderPrice = 0, mOrderPrice = 0, lOrderPrice = 0;
    goto down;
    }
    //Select small cup based calculation
    else {
    if (s_ch == 1) {
    cout << “Please enter the number of small cups you need:”;
    cin >> num;
    sOrder+=num;
    sOrderPrice = sOrder * 4.29;
    sOrderDay += sOrder;
    sOrderDayPrice = sOrderDay * 4.29;
    SideMenu();
    cout << “Please enter the size of cup: “;
    cin >> s_ch;
    }
    //Select medium cup based calculation
    else if (s_ch == 2) {
    cout << “Please enter the number of medium cups you need:”;
    cin >> num;
    mOrder+= num;
    mOrderPrice = mOrder * 5.89;
    mOrderDay += mOrder;
    mOrderDayPrice = mOrderDay * 5.89;
    SideMenu();
    cout << “Please enter the size of cup: “;
    cin >> s_ch;
    }
    //Select large cup based calculation
    else if (s_ch == 3) {
    cout << “Please enter the number of medium cups you need:”;
    cin >> num;
    lOrder+= num;
    lOrderPrice = lOrder * 6.49;
    lOrderDay += lOrder;
    lOrderDayPrice = lOrderDay * 6.49;
    SideMenu();
    cout << “Please enter the size of cup: “;
    cin >> s_ch;
    }
    }
      
    }
    //Repeat your choice
    down:
    MainMenu();
    cout << “Please enter you choice: “;
    cin >> ch;
    break;
    //If you want todays sale report
    case 2:
    //Print all details
    cout << “TOTAL SALE ICE CREAM REPORT” << endl;
    cout << “Date: ” << str << endl;
    cout << “Small: ” << sOrderDay << ” ” <<sOrderDayPrice << endl;
    cout << “Medium: ” << mOrderDay << ” ” <<mOrderDayPrice << endl;
    cout << “Large: ” << lOrderDay << ” ” <<lOrderDayPrice << endl;
    cout <<“——————————————————-” <<endl;
    cout << “SubTotal: ” << fixed << setprecision(2)<< sOrderDayPrice + mOrderDayPrice + lOrderDayPrice <<endl;
    cout << “Tax(8.25%): ” << fixed <<setprecision(2) << (sOrderDayPrice + mOrderDayPrice +lOrderDayPrice)*.0825 << endl;
    cout << “Total: ” << fixed << setprecision(2)<< ((sOrderDayPrice + mOrderDayPrice + lOrderDayPrice) +((sOrderDayPrice + mOrderDayPrice + lOrderDayPrice)*.0825))<< endl;
    //Prompt for file save
    cout << “Do you want to save the sale today to file?(Y/N):”;
    cin >> fileStore;
    //If yes then save space difference format
    if (fileStore == ‘y’ || fileStore == ‘Y’){
    std::ofstream outfile;
    outfile.open(“C:/Users/deept/Desktop/sale_0318.txt”,std::ios_base::app);
    outfile << str << ” ” << sOrderDay << ” “<< mOrderDay << ” ” << lOrderDay <<endl;
    sOrderDayPrice = 0, mOrderDayPrice = 0, lOrderDayPrice = 0;
    outfile.close();
    MainMenu();
    cout << “Please enter you choice: “;
    cin >> ch;
    }
    //otherwise prompt user for next option
    else {
    MainMenu();
    cout << “Please enter you choice: “;
    cin >> ch;
    }
    //Monthly report
    case 3:
    cout << “Which month report do you want?(MMYYYY): “;
    cin >> mon;
    //Open file
    in.open(“C:/Users/deept/Desktop/sale_0318.txt”);
    while (!in.eof()) {
    //Take date from each line and split into string format the userenter and compare
    in >> dateVal;
    str1 = dateVal.substr(3, 2);
    str2=dateVal.substr(6, 4);
    str3 = str1 + str2;
    //If same then calculate
    if (str3 == mon) {
    in >> s >> m >> l;
    totalS += s;
    totalM += m;
    totalL += l;
    }
    in.close();
    }
    //Display all details
    cout << “TOTAL SALE ICE CREAM Month REPORT” <<endl;
    cout << “Date: “<

    return 0;
    }
    //Main menu details
    void MainMenu() {
    cout << “ICE CREAM STOREn1. Sale Ice Creamn2. Total SaleIce Cream todayn3. Total Sale Ice Cream In Monthn0. Exit”<< endl;
    }
    //Second menu details
    void SideMenu() {
    cout << “ICE CREAM STOREn1. Small cupn2. Medium Cupn3.Large Cupn0. Done” << endl;
    }

    Need help figuring out what i need to take out without messingup the program and replace it with this code.

    WRITE THE CODE 1. Create the project SU2018LAB6_yourLastname 2. Add source file SU2018LAB6_IceCreamStore_yourLastName.cpp 3. Follow the step by step in the above pseudo-code write the code of main) Remember to create at least 3 user-defined functions HINT: HOW TO GENERATE TODAY #include <time.h> char date[9]; _strdate_s(date); > date-03/18/18 HOW TO GENERATE THE FILE NAME #include <sstream> date03/18/18 stringstream ss; string temp; int slash; slash-date.find(/ string monthtemp.subst(e, slash);//03 temp date.substr(slash 1); slash-date.find(/) string day-temp.substr(e, slash);//18 string year-temp.substr(slash1) s< sale_ << month <<year <.txt; string fileName ss. str();

    What I need help with is my code is good it works but I needhelp taking out certain codes and putting in the hints given to meby the professor.

    WRITE THE CODE 1. Create the project SU2018LAB6_yourLastname 2. Add source file SU2018LAB6_IceCreamStore_yourLastName.cpp 3. Follow the step by step in the above pseudo-code write the code of main) Remember to create at least 3 user-defined functions HINT: HOW TO GENERATE TODAY #include char date[9]; _strdate_s(date); > date-“03/18/18″ HOW TO GENERATE THE FILE NAME #include date”03/18/18″ stringstream ss; string temp; int slash; slash-date.find(/” string monthtemp.subst(e, slash);//03 temp date.substr(slash 1); slash-date.find(“/”) string day-temp.substr(e, slash);//18 string year-temp.substr(slash1) sShow transcribed image text

    Expert Answer


    . . .


    view full answer
  • QUESTION : (Solved) : Code Shown Work Positive Cubes 1 Modify Code Make Work Numbers Less 1 Negative Cubes 05 E Q26356485 . . .

    This code as shown below only work for positive cubes > 1 Modify this code to make it work with numbers less than 1(or negative cubes). Such as a = 0.5 and explain why does this particular code does not work with numbers less than 1. inputstr = input(‘Enter an integer: ‘)a = float(inputstr)a = abs(a)epsilon = 0.01increase = 0.0001num_steps = 0low = 0.0high = max(1.0, a)current_guess = (high + low) / 2.0while abs(current_guess**3 – a) > epsilon: print (‘low =’, low, ‘high =’, high, ‘guess =’, current_guess) if (current_guess**3 – a < 0): low = current_guess else: high = current_guess current_guess = (high + low) / 2.0 num_steps = num_steps + 1print (‘# after ‘, num_steps, ” guesses we get square root of “, a, “is approximated”, current_guess)

    Expert Answer


    . . .


    view full answer