merhaba, ödev gereği kendi çapımda fortran da bi şeyler yapmaya çalışıyorum ama her seferinde "Invalid expression on left hand side of assignment" uyarısı alıyorum. ekte yazdığım kodun hata veren kısmı ve ekran görüntüsü var. yardımcı olursanız süper olur. iyi akşamlar.

----------kod----------

program hmwrk2

character (len=11)::dollar, yen, tl, sterlin, england, usa, germany, turkey, japan, unit, euro
real::x, y, price, t, dolla

print*, "please enter the name of country or Money Unit in which laptop is sold"
read*, unit
print*, "please enter the price of the laptop computer"
read*, price

if ((unit==dollar) .or. (unit==usa)) then
price*(1.46)=t
if (t<1750) then
print*,"laptop computer is",t,"TL","and it is very cheap!"
else if ((t<2000) .and. (t>1750)) then
print*, "laptop computer is",t,"TL","and it is cheap!"
else if ((t<2200) .and. (t>2000)) then
print*,"laptop computer is",t,"TL","and it is expensive!"
else if then
print*,"laptop computer is",t,"TL","and it is very expensive!"
end if

else if then
print*, "please enter ...."
end if
end program hmwrk2

----------kod----------

ekran görüntüsü:

i39.tinypic.com

 

fortran'da hiç kod yazmadım da assignment hatasına bakılırsa sanırım şu satır hatalı
price*(1.46)=t

t = price*(1.46) yapmayı dene bi.

tepedeki psychedelic adam

çok teşekkürler :)

ferishtah
1

mobil görünümden çık