{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

notes cs - cout<<"enter number"...

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

View Full Document Right Arrow Icon
int sum = 0; int number; cout<<"enter a postive number: "; cin>>number; while(number >= 0) { sum=sum+number;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: cout<<"enter number: "; cin>>number; } cout<<"sum is "<<sum<<endl;...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online