Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*Section A*/
- result(anik,3.52).
- result(runa,3.22).
- result(luna,3.60).
- result(rabbi,3.67).
- result(anika,3.00).
- /*Section B*/
- result(urmi,3.55).
- result(raima,3.12).
- result(robi,2.60).
- result(alok,3.64).
- result(pia,3.10).
- getresult:-
- write('Enter the name of the student of section A: '),read(X),nl,
- result(X,Y),
- write(Y),nl,
- write('Enter the name of the student of section B: '),read(A),nl,
- result(A,B),
- write(B),nl,
- compare(Y,B).
- compare(Y,B):-
- Y>B,write('maximum result is='),write(Y),nl,write('Section A student is good');
- B>Y,write('maximum result is='),write(B),nl,write('Section B student is good');
- Y=:=B,write('both are same').
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement