My friend needs help with his project I dont know why one line isnt being read

Write your question here.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
  // This program calculates how much a song makes on different streaming services
#include <iostream>
#include <iomanip>
#include <string>
using namespace std;

int main()
{

int choice;
int views;
string artist;
string song;
// Choice= streaming selection/ num= the amount of views the song gets.
// This is where the menu is displayed

cout << "Which streaming service will you use to upload your song? " << endl;
cout << " 1: TIDAL " << endl;
cout << " 2: Amazon " << endl;
cout << " 3: Apple Music " << endl;
cout << " 4: Spotify " << endl;
cout << " 5: Youtube " << endl;

cout << " Please enter a number (1-5) to select which service you want to upload to. " << endl;

cin >> choice;

// TIDAl= 0.0125, Amazon= 0.00402, AM(Apple Music)= 0.00737, Spotify= 0.00437, Youtube= 0.00069
double Tidal= 0.0125, Amazon= 0.00402, AM= 0.00737, Spotify= 0.00437, Youtube= 0.00069;

// The lines below are the calcualtions based on the different choices the user imputs.
// Each of the choice options below as the user for the name of the artist, the name of the song, and how many views it has.
if (choice == 1)
{

	
	    cout << " What is the Artist's name? " << endl;
        cin >> artist;
        cout << " What song from the artist do you want to upload? " << endl;
        cin >> song;
    
		cout << " How many views does the song have? " << endl;
		cin >> views;

		cout << "Song Name: " << song << endl;
	    cout << "Artist's Name: " << artist << endl;
	    cout << "Streaming Service: " << "TIDAL" << endl;
	    cout << "Money Made $ " << (Tidal * views) << endl;


}

if (choice == 2)
{
	
     cout << " What is the Artist's name? " << endl;
     cin >> artist;
	 cout << " What song from the artist do you want to upload? " << endl;
	 cin >> song;
	
	 cout << " How many views does the song have? " << endl;
	 cin >> views;
	 
	 cout << "Song Name: " << song << endl;
	 cout << "Artist's Name: " << artist << endl;
	 cout << "Streaming Service: " << "Amazon" << endl;
	 cout << "Money Made $ " << (Amazon * views) << endl;
	
}

if (choice == 3)
{
	
	 cout << " What is the Artist's name? " << endl;
	 cin >> artist;
	 cout << " What song from the artist do you want to upload? " << endl;
	 cin >> song;
	   
	 cout << " How many views does the song have? " << endl;
	 cin >> views;
	 
	 cout << "Song Name: " << song << endl;
	 cout << "Artist's Name: " << artist << endl;
	 cout << "Streaming Service: " << "Apple Music" << endl;
 	cout << "Money Made $ " << (AM * views) << endl;
	
}

if (choice == 4)
{
	
	 cout << " What is the Artist's name? " << endl;
	 cin >> artist;
	 cout << " What song from the artist do you want to upload? " << endl;
	 cin >> song;
	
	 cout << " How many views does the song have? " << endl;
	 cin >> views;
	
	 cout << "Song Name: " << song << endl;
	 cout << "Artist's Name: " << artist << endl;
	 cout << "Streaming Service: " << "Spotify" << endl;
	 cout << "Money Made $ " << (Spotify * views);
	
}

if (choice == 5)
{
	
	cout << " What is the Artist's name? " << endl;
	cin >> artist;
	cout << " What song from the artist do you want to upload? " << endl;
	cin >> song;
	
	cout << " How many views does the song have? " << endl;
	cin >> views;
	
	cout << "Song Name: " << song << endl;
	cout << "Artist's Name: " << artist << endl;
	cout << "Streaming Service: " << "Youtube" << endl;
	cout << "Money Made $ " << (Youtube * views);
}

if (choice >= 6)
{
	
	cout << " Error: Choice entered is not in the range of choices (1-5)" << endl;
}

return 0;
}
Topic archived. No new replies allowed.