Reja: Struktura tushunchasi tarifi


Download 0.6 Mb.
bet3/3
Sana21.04.2023
Hajmi0.6 Mb.
#1367829
1   2   3
Bog'liq
Strukturalar . Strukturalar ustida amallar

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"; }

Download 0.6 Mb.

Do'stlaringiz bilan baham:
1   2   3




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling