ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search
 Posted - Sep 10 2021 :  13:59:17 Hello i would need to covert this py program to pascal but im not very familiar with pascal. Can someone help me?``` x = int(input("Unestite broj: ")) if not x == 0: y = int(input("Unesite jos jedan broj: ")) if y == 0: if x % 10 == 7: nulti = x print (x) else: z = int(input("Unesite jos jedan broj: ")) if z == 0: if y % 10 == 7 and x % 10 == 7: prvi = (x+y)/2 print (prvi) if y % 10 == 7 and not x % 10 == 7: prvia = y print (prvia) if x % 10 == 7 and not y % 10 == 7: prvib = x print (prvib) else: a = int(input("Unesite jos jedan broj: ")) if a == 0: if z % 10 == 7 and y % 10 == 7 and x % 10 == 7: prvi = (x+y+z)/3 print (prvi) if z % 10 == 7 and not x % 10 == 7 and not y % 10 == 7: prvia = z print (prvia) if z % 10 == 7 and x % 10 == 7 and not y % 10 == 7: prvid = (z+x)/2 print (prvid) if y % 10 == 7 and not x % 10 == 7 and not z % 10 == 7: prvig = y print (prvig) if y % 10 == 7 and z % 10 == 7 and not x % 10 == 7: prvik = (y+z)/2 print (prvik) if x % 10 == 7 and not y % 10 == 7 and not z % 10 == 7: prvib = x print (prvib) if x % 10 == 7 and y % 10 == 7 and not z % 10 == 7: prvic = (x+y)/2 print (prvic) else: b = int(input("Unesite jos jedan broj: ")) if b == 0: if z % 10 == 7 and y % 10 == 7 and x % 10 == 7 and not a % 10 == 7: prvi = (x+y+z)/3 print (prvi) if z % 10 == 7 and not x % 10 == 7 and not y % 10 == 7 and not a % 10 == 7: prvia = z print (prvia) if z % 10 == 7 and x % 10 == 7 and not y % 10 == 7 and not a % 10 == 7: prvib = (z+x)/2 print (prvib) if y % 10 == 7 and not x % 10 == 7 and not z % 10 == 7 and not a % 10 == 7: prvic = y print (prvic) if y % 10 == 7 and z % 10 == 7 and not x % 10 == 7 and not a % 10 == 7: prvid = (y+z)/2 print (prvid) if x % 10 == 7 and not y % 10 == 7 and not z % 10 == 7 and not a % 10 == 7: prvie = x print (prvie) if x % 10 == 7 and y % 10 == 7 and not z % 10 == 7 and not a % 10 == 7: prvif = (x+y)/2 print (prvif) if z % 10 == 7 and y % 10 == 7 and x % 10 == 7 and a % 10 == 7: prvig = (x+y+z+a)/4 print (prvig) if a % 10 == 7 and z % 10 == 7 and y % 10 == 7 and not x % 10 == 7: prvij = (a+z+y)/3 print (prvij) if a % 10 == 7 and z % 10 == 7 and x % 10 == 7 and not y % 10 == 7: prvik = (a+z+x)/3 print (prvik) if a % 10 == 7 and y % 10 == 7 and x % 10 == 7 and not z % 10 == 7: prvil = (a+y+x)/3 print (prvil) if a % 10 == 7 and y % 10 == 7 and not x % 10 == 7 and not z % 10 == 7: prvim = (a+y)/2 print (prvim) if a % 10 == 7 and z % 10 == 7 and not x % 10 == 7 and not y % 10 == 7: prvin = (a+z)/2 print (prvin) if a % 10 == 7 and x % 10 == 7 and not y % 10 == 7 and not z % 10 == 7: prvio = (a+x)/2 print (prvio) if a % 10 == 7 and not x % 10 == 7 and not y % 10 == 7 and not z % 10 == 7: prvip = a print (a) else: quit() ```