A program that accepts data for an ID number of a dog’s owner, and the name, breed, age, and weight of the dog. Display a bill containing all the input data as well as the weekly day care fee, which is $55 for dogs under 15 pounds, $75 for dogs from 15 to 30 pounds inclusive, $105 for dogs from 31 to 80 pounds inclusive, and $125 for dogs over 80 pounds. Write the pseudo code.
1
Expert's answer
2011-10-27T08:17:25-0400
#include <cstdlib> #include <iostream>
using namespace std; int weight,age,price; string name,breed; int main(int argc, char *argv[]) { cout<<"Enter name : "; cin>>name; cout<<"Enter breed : "; cin>>breed; cout<<"Enter age : "; cin>>age; cout<<"Enter weight : "; cin>>weight; if (weight<15) price=55; else if (weight>=15 && weight<=30) price=75; else if (weight>=31 && weight<=80) price=105; else if (weight>80) price=125; cout<<endl; cout<<" name : "<<name<<endl; cout<<" breed : "<<breed<<endl; cout<<" age : "<<age<<endl; cout<<" weight : "<<weight<<endl; cout<<" weekly day care fee : "<<price<<endl; system("PAUSE"); return EXIT_SUCCESS; }
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment