Ĺadny brzuch
Witam. Potrzebuję krótkiego programu, ale niestety nie wiem jak sie za niego zabrac gdyz nie znam kompletnie Pascala.
Ogolnie męczę się z tym od dluzszego czasu i mi to średnio wychodzi. Jeżeli któs mógłby mi pomóc byłbym wdzięczny.
Oto nieszczęsny program i tłumaczenie po polsku poniżej:
create a program that prompts the user to enter a score for students out of 20 for a multiple choice test. The number of students who take the test will vary so you must ensure that the user can enter the number of students sitting the multiple choice test.
After the loop has finished can you please display the names of the students taking the test, their result and finally the overall number of people who sat the test.
you are required to amend the program to check that the mark entered for the student is between 0 and 20. If the mark i s out with this range
an error message should instruct the user to re-enter a mark between 0 an 20
Should have also the avaerage mark for the class
Stwórz program, który wywoła użytkownika do wprowadzenia wyniku od 0 do 20, dla testu wielokrotnego wyboru (jednej poprawnej odpowiedzi z kilku możliwości), dla studentów. Ilosc studentow biarących udział w tym tescie będzie mogla się zmieniac więc musisz upewnić się, że uzytkownik może wprowadzic ilosc studentów którzy zrobią ten test.
Po zakończeniu pętli jesteś proszony o przedstawienie imion/nazwisk stdentów którzy zrobili ten test, ich wyniki a także ostateczną ilośc osób które zrobiły test.
Wymagane jest również aby program sprawdził, która wprowadzona ocena dla studentów jest z przedziału 0-20. Jeśli ocena nie należy do tego przedziału komunikat błędu powinien poinformowac uzytkownika o ponownym wpisaniu poprawnej oceny z przedziału 0-20.
Pownienes róznież znac średnią ocenę dla całej klasy.
Zamieszczam moje wypociny, ale ogolnie nie wiem kompletnie o co chodzi, wiec sie nie smiejcie Wink
program multiple_test; {$APPTYPE CONSOLE} uses SysUtils; var Students: Integer; Max_score: Integer; Score: Integer: First_name: String; Surname: String; Mark: Integer; Grade: Char; Initial_1:Char; Initial_2:Char; Percent: Real; Count: Integer; begin Writeln ('Please enter the number of students in a class'); Readln (Students); end; begin writeln ('Enter First Name of student => '); readln (First_name); writeln ('Enter surname of student here =>'); readln(Surname); writeln ('Enter actual mark => '); readln (Mark); end; readln; begin end.
Do tego momentu działa. Dalej nie wiem co mam zrobić Sad
Użytkownik katarina edytował ten post 01 czerwiec 2008, 09:22
Pętlę.
więcej np. tu: pascal.eu.org lub tu: Google.
Do tego tablice, najlepiej dynamiczne, przechowujące rekordy. Najlepiej odpal Delphi i poszukaj w helpie - tam jest wszystko opisane.
//EDIT: literówka.
Użytkownik ROB4L edytował ten post 02 czerwiec 2008, 14:59
Nie Delphi, tylko pascal.
Wiem, że nie Delphi. Ale Help od Delphi to jedno z lepszych źródeł wiedzy na ten temat.
zanotowane.pl doc.pisz.pl pdf.pisz.pl zsf.htw.pl
Ogolnie męczę się z tym od dluzszego czasu i mi to średnio wychodzi. Jeżeli któs mógłby mi pomóc byłbym wdzięczny.
Oto nieszczęsny program i tłumaczenie po polsku poniżej:
create a program that prompts the user to enter a score for students out of 20 for a multiple choice test. The number of students who take the test will vary so you must ensure that the user can enter the number of students sitting the multiple choice test.
After the loop has finished can you please display the names of the students taking the test, their result and finally the overall number of people who sat the test.
you are required to amend the program to check that the mark entered for the student is between 0 and 20. If the mark i s out with this range
an error message should instruct the user to re-enter a mark between 0 an 20
Should have also the avaerage mark for the class
Stwórz program, który wywoła użytkownika do wprowadzenia wyniku od 0 do 20, dla testu wielokrotnego wyboru (jednej poprawnej odpowiedzi z kilku możliwości), dla studentów. Ilosc studentow biarących udział w tym tescie będzie mogla się zmieniac więc musisz upewnić się, że uzytkownik może wprowadzic ilosc studentów którzy zrobią ten test.
Po zakończeniu pętli jesteś proszony o przedstawienie imion/nazwisk stdentów którzy zrobili ten test, ich wyniki a także ostateczną ilośc osób które zrobiły test.
Wymagane jest również aby program sprawdził, która wprowadzona ocena dla studentów jest z przedziału 0-20. Jeśli ocena nie należy do tego przedziału komunikat błędu powinien poinformowac uzytkownika o ponownym wpisaniu poprawnej oceny z przedziału 0-20.
Pownienes róznież znac średnią ocenę dla całej klasy.
Zamieszczam moje wypociny, ale ogolnie nie wiem kompletnie o co chodzi, wiec sie nie smiejcie Wink
program multiple_test; {$APPTYPE CONSOLE} uses SysUtils; var Students: Integer; Max_score: Integer; Score: Integer: First_name: String; Surname: String; Mark: Integer; Grade: Char; Initial_1:Char; Initial_2:Char; Percent: Real; Count: Integer; begin Writeln ('Please enter the number of students in a class'); Readln (Students); end; begin writeln ('Enter First Name of student => '); readln (First_name); writeln ('Enter surname of student here =>'); readln(Surname); writeln ('Enter actual mark => '); readln (Mark); end; readln; begin end.
Do tego momentu działa. Dalej nie wiem co mam zrobić Sad
Użytkownik katarina edytował ten post 01 czerwiec 2008, 09:22
Pętlę.
więcej np. tu: pascal.eu.org lub tu: Google.
Do tego tablice, najlepiej dynamiczne, przechowujące rekordy. Najlepiej odpal Delphi i poszukaj w helpie - tam jest wszystko opisane.
//EDIT: literówka.
Użytkownik ROB4L edytował ten post 02 czerwiec 2008, 14:59
Nie Delphi, tylko pascal.
Wiem, że nie Delphi. Ale Help od Delphi to jedno z lepszych źródeł wiedzy na ten temat.