Masala4.Karta raqami 7777 teng bo`lgan haridor ismi familiyasi chiqarilsin
Masala5. Yangi struktura hosil qiling funksiyadan foydalangan holda ekranga ma`lumotlarni chiqaring.
#include
#include
#include
using namespace std;
struct movies_t {
string title;
int year;
} yours;
void printmovie (movies_t movie);
int main (){
string mystr;
cout << "FISH : ";
getline (cin,yours.title);
cout << "YILI : ";
getline (cin, mystr);
stringstream(mystr) >> yours.year;
printmovie (yours);
return 0; }
void printmovie (movies_t movie)
{ cout << movie.title;
cout << " (" << movie.year << ")\n"; }
Do'stlaringiz bilan baham: |