part21c - WRITE(*,*) "f(x)="...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
PROGRAM part21c IMPLICIT NONE REAL:: x,y WRITE(*,*) "Please enter a real number:" READ(*,*) x IF(x<0) THEN WRITE(*,*) "f(x)=" y=(-2)*x+3 WRITE(*,*) y ELSE IF(x>=0 .AND. x<=1) THEN
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: WRITE(*,*) &quot;f(x)=&quot; y=cos(x) WRITE(*,*) y ELSE IF(x&gt;1) THEN WRITE(*,*) &quot;f(x)=&quot; y=(0.5)*x+7 WRITE(*,*) y END IF END PROGRAM...
View Full Document

Ask a homework question - tutors are online