i am haveing alot of problems in my computer programming 1 clas in school and was wondring if any people on here would be kind enough to help me out with some programs 1 of them is this

i need to make a basic program in the compiler that allows the user to input the name of their favorite song who the song is by the number of the songs they want to buy and

each song cost $0.89 and taxrate is 5%

at the end i need it to say this in the compiler

songs purchased:5
cost per song:$0.89
cost before taxes:(cost before taxes)
taxes:(tax prices added up for each song)
final cost:(final cost with taxes)

if any1 can help me thank u and please post the program in ur reply

please help!!!

Recommended Answers

All 3 Replies

Have you tried to solve the problem yourself?
Post your code and we will offer some suggestions.

Obviously you will need interactive input so use

//to prompt the user for input use
cout<< ...
//to obtain input from the keyboard use
cin>>...

yes i have tried here is what i came up with i know im dumb =[
#include <iostream>
using namespace std;

int main()
{
Const song cost=$0.89;
const taxrate=5%;
string song artist;
int quantity;
double total cost taxes;

cout<<"what is the name of your favorite song"<<endl;
cin>>song;
cout<<"name of favorite artist"<<endl;
cin>>artist;

First of all please use code tags when posting code. Thanks.
Your variable names cant have spaces. Make it one word or put underscores between the words.
const should start with a lowercase c not capital.
Obviously you'll also need to set a return value of 0 and close the main() with a }

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.