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

This note was uploaded on 09/25/2009 for the course CS 1400 taught by Professor Staff during the Spring '08 term at Utah State University.

Ask a homework question - tutors are online