Code: Zaznacz cały
#include<conio.h>
#include<iostream>
using namespace std;
struct student
{
int nr_album;
char imie[15];
char nazwisko[25];
float ocena_w;
float ocena_l;
float srednia()
{
return (ocena_l+ocena_w)/2;
}
}zm[3];
void wpisz_s(int index)
{
cout<<"Podaj numer albumu studenta: ";
cin>>zm[index].nr_album;
cout<<"Podaj imie studenta: ";
cin>>zm[index].imie;
cout<<"Podaj nazwisko studenta: ";
cin>>zm[index].nazwisko;
cout<<"Podaj ocena z wykladow: ";
cin>>zm[index].ocena_w;
cout<<"Podaj z labolatorium: ";
cin>>zm[index].ocena_l;
}
void wpisz_w()
{
for(int i=0; i<3; i++)
{
wpisz_s(i);
}
}