1 / 1

1384491788

Download Presentation

1384491788

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. C PROGRAM TO PRINT OUT EVEN/ ODD NATURAL NUMBERS BETWEEN GIVEN LIMITS WRITE ( *,* ) ‘ENTER LOWER LIMIT VALUE L’ READ (*,* ) L WRITE ( *,* ) ‘ENTER UPPER LIMIT VALUE M’ READ(*,*) L , M IF ( MOD ( L, 2 ).EQ.0 ) THEN N = L K = L+1 ENDIF IF ( MOD ( L, 2 ).NE..0 ) THEN N = L +1 K = L ENDIF WRITE (*,* ) ‘EVEN NUMBERS ARE : ‘ DO 10 I = N,M,2 WRITE (*,*) I10 CONTINUE WRITE (*,* ) ‘ODD NUMBERS ARE : ‘ DO 20 I = K,M,2 WRITE (*,*) I20 CONTINUE STOP END

More Related