simbata Posted June 14, 2005 Share Posted June 14, 2005 Da se sastavi programa, koqto vavejda informacia za n ot 1 do 130 jilishtni stroeji vav vida ime na arhitekt, adres, cena na sgradata . Programata da izvejda informacia za nai-evtinata sgrada i za neinia arhitekt. Помощ, плс Link to comment Share on other sites More sharing options...
Mr_Vain Posted June 14, 2005 Share Posted June 14, 2005 Сега съм малко зает, но до час-два ще ти я надраскам. Link to comment Share on other sites More sharing options...
simbata Posted June 14, 2005 Author Share Posted June 14, 2005 Сега съм малко зает, но до час-два ще ти я надраскам. <{POST_SNAPBACK}> Много 10х, ако го направиш, ще те запомня с добро Link to comment Share on other sites More sharing options...
Mr_Vain Posted June 14, 2005 Share Posted June 14, 2005 Ето едно просто решение: program builder; type building = record archname, address : string; price : real; end; var n, c, max : byte; maxprice : real; bld : array[1..130] of building; begin write('N = '); readln(n); for c := 1 to n do begin writeln('Zapis: ', c); write('Ime : '); readln(bld[c].archname); write('Adres: '); readln(bld[c].address); write('Cena : '); readln(bld[c].price); end; maxprice := bld[1].price; for c := 2 to n do begin if bld[c].price < maxprice then begin maxprice := bld[c].price; max := c; end; end; writeln;writeln('Informaciq za nai-evtinata sgrada:'); writeln(bld[max].archname); writeln(bld[max].price:1:2); readln; end. Link to comment Share on other sites More sharing options...
simbata Posted June 14, 2005 Author Share Posted June 14, 2005 Ето едно просто решение: program builder; type building = record archname, address : string; price : real; end; var n, c, max : byte; maxprice : real; bld : array[1..130] of building; begin write('N = '); readln(n); for c := 1 to n do begin writeln('Zapis: ', c); write('Ime : '); readln(bld[c].archname); write('Adres: '); readln(bld[c].address); write('Cena : '); readln(bld[c].price); end; maxprice := bld[1].price; for c := 2 to n do begin if bld[c].price < maxprice then begin maxprice := bld[c].price; max := c; end; end; writeln;writeln('Informaciq za nai-evtinata sgrada:'); writeln(bld[max].archname); writeln(bld[max].price:1:2); readln; end. <{POST_SNAPBACK}> Е т`ва е! Мерси братче Адски благодарен съм Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.