- 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
#include<iostream>
#include<istream>
#include<fstream>
#include<string>
using namespace std;
const int con=100;
const int MAX=3;
class movie
{
public:
string title;
string genre;
string country;
int year;
double gainings;
};
int main(); {
{
string* argv = new string[10]={ "Star wars", "Harry Potter" , "Lion king", "Lord of the rings" , "Evgozavur", "Cow's house" , "Snow dogs", "Ice age" , "Shrek", "Dino"};
int n=1,gainigs=10;
int a,b,c;
movie film1;
movie film2;
movie film3;
cout << " Enter the title:"<<endl;
cin>>film1.title;
cout << " Enter the genre:"<<endl;
cin>>film1.genre;
cout << " Enter the country:"<<endl;
cin>>film1.dev;
cout << " Enter the year:"<<endl;
cin>>film1.year;
cout << " Enter the gainings:"<<endl;
cin>>a;
while (a>10){
cout << " Enter the gainings:"<<endl;
cin>>a;
}film1.gainings=a;
cout<<endl<<endl<<endl;
cout<<" Enter the title:"<<endl;
cin>>film2.title;
cout<<" Enter the genre:"<<endl;
cin>>film2.genre;
cout<<" Enter the dev:"<<endl;
cin>>film2.dev;
cout<< " Enter the year:"<<endl;
cin >> film2.year;
cout<<" Enter the gainings:"<<endl;
cin>>b;
while (b>10){
cout<<" Enter the gainings:"<<endl;
cin>>b;
}game2.gainings=b;
cout<<endl<<endl<<endl;
cout<<" Enter the title:"<<endl;
cin>>film3.title;
cout<<" Enter the genre:"<<endl;
cin>>film3.genre;
cout<<" Enter the dev:"<<endl;
cin>>film3.dev;
cout<<" Enter the year:"<<endl;
cin>>film3.year;
cout<<" Enter the gainings:"<<endl;
cin>>c;
while (c>10){
cout<<" Enter the gainings:"<<endl;
cin>>c;
}film3.gainings=c;
for (int j=0; j<n; j++)
{
cout<<""<<endl;
cout<<"Title: " <<film1.title<<endl;
cout<<"Genre: " <<film1.genre<<endl;
cout<<"Year: " <<film1.year<<endl;
cout<<"Gainings: "<<film1.gainings<<endl;
cout<<""<<endl;
cout<< "Title: "<<film2.title<<endl;
cout<< "Genre: "<<film2.genre<<endl;
cout<< "Year: "<<film2.year<<endl;
cout<< "Gainings: " << film2.gainings<<endl;
cout<<""<<endl;
cout<<"Title: " <<film3.title <<endl;
cout<<"Genre: " <<film3.genre <<endl;
cout<<"Year: " <<film3.year <<endl;
cout<<"Gainings: "<<film3.Gainings<<endl;
cout<<"works"<<endl;
}
cout<<"printing works"<<endl;
argv[0]=film1.title;
argv[1]=film1.genre;
argv[2]=film1.year;
argv[3]=film1.gainings;
cout<<"adding works"<<endl;
cout<<endl<<endl<<endl;
cout<<argv[0]<<endl;
cout<<argv[1]<<endl;cout<<argv[2]<<endl;cout<<argv[3]<<endl;
cout<<"print after add works"<<endl;
system("pause");
return 0;
}
Комментарии (2) RSS