Answer:
here is code in C++.
#include <bits/stdc++.h>
using namespace std;
int main()
{
// variables to store number of each video
int new_video,old_video;
double total_charge;
cout<<"Please enter number of new video:";
// read number of new video
cin>>new_video;
cout<<"Please enter number of old video:";
// read number of old video
cin>>old_video;
// total change
total_charge=(3.0*new_video)+(2.0*old_video);
cout<<"total cost is: "<<total_charge<<endl;
return 0;
}
Explanation:
Declare two variables "new_video" and "old_video" to store the number of each type of video.Read the value of both from user.Then calculate total charge by multiply 3.0 to number of new video & 2.0 to number of old video and add both of them. This will be the total charge.
Output:
Please enter number of new video:4
Please enter number of old video:6
total cost is: 24