Kassem Mustafa Bagher 0713600

Kassem Mustafa Bagher 0713600 - sightings = 0...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Kassem Mustafa Bagher 0713600 #include <stdio.h> #define SENTINEL 0 #define NUM_MONTHS 12 int main( void ) { int month,mem_sight,sightings,total=0; system( "title Kassem Mustafa Kassem Bagher - 0713600" ); printf( "---------- BALD EAGLE SIGHTINGS -----------\n\n" ); printf( "-- Kassem Mustafa Kassem Bagher 0713600 --\n\n" ); printf( "Enter Numbers Of Eagles That Have Been Seen.\n" ); printf( "Enter 0 After Each Month.\n\a" ); for (month=1;month<=NUM_MONTHS;++month)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: { sightings = 0; scanf( "%d" ,&mem_sight); while (mem_sight!=SENTINEL) { if (mem_sight>=0) sightings += mem_sight; else printf( "Warning, Negative Count %d Ignored\n\a" ,mem_sight); scanf( "%d" ,&mem_sight); } total += sightings; printf( " Month %2d: %2d\n\a" ,month,sightings); } printf( "\n* The Total For 1 Year Is: %d Eagle\n\n" ,total); return (0); }...
View Full Document

{[ snackBarMessage ]}

Page1 / 2

Kassem Mustafa Bagher 0713600 - sightings = 0...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online