Follow along with the video below to see how to install our site as a web app on your home screen.
Not: This feature may not be available in some browsers.
[FONT=Consolas]#include<iostream>
usingnamespace std;
constint ogrenciSayisi = 2;
struct ogrenci
{
string isim;
int vizeNot;
int finalNot;
};
int main()
{
ogrenci ogrenciler[ogrenciSayisi];
// Bilgiler giriliyor...
for(int i = 0; i < ogrenciSayisi; i++)
{
cout << i + 1 << ". ogrencinin ismini giriniz: ";
cin >> ogrenciler[i].isim;
cout << i + 1 << ". ogrencinin vize notunu giriniz: ";
cin >> ogrenciler[i].vizeNot;
cout << i + 1 << ". ogrencinin final notunu giriniz: ";
cin >> ogrenciler[i].finalNot;
cout << endl;
}
//Örnek olarak bir öğrenci bilgileri yazdırılıyor...
cout << "------- Ogrenci 1 --------" << endl;
cout << " Isim: " << ogrenciler[0].isim << endl;
cout << " Vize: " << ogrenciler[0].vizeNot << endl;
cout << " Final: " << ogrenciler[0].finalNot << endl;
cout << "--------------------------" << endl;
}
[/FONT]
Aynısını Yaptım hocam biraz araştırınca struct yapısını.. Çok teşekkürlerKod:[FONT=Consolas]#include<iostream> usingnamespace std; constint ogrenciSayisi = 2; struct ogrenci { string isim; int vizeNot; int finalNot; }; int main() { ogrenci ogrenciler[ogrenciSayisi]; // Bilgiler giriliyor... for(int i = 0; i < ogrenciSayisi; i++) { cout << i + 1 << ". ogrencinin ismini giriniz: "; cin >> ogrenciler[i].isim; cout << i + 1 << ". ogrencinin vize notunu giriniz: "; cin >> ogrenciler[i].vizeNot; cout << i + 1 << ". ogrencinin final notunu giriniz: "; cin >> ogrenciler[i].finalNot; cout << endl; } //Örnek olarak bir öğrenci bilgileri yazdırılıyor... cout << "------- Ogrenci 1 --------" << endl; cout << " Isim: " << ogrenciler[0].isim << endl; cout << " Vize: " << ogrenciler[0].vizeNot << endl; cout << " Final: " << ogrenciler[0].finalNot << endl; cout << "--------------------------" << endl; } [/FONT]