Sum 1 - Number

Sum 1 - Number - cin>> num}while(num< 1 for(count = 1...

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

View Full Document Right Arrow Icon
Sheet1 Page 1 #include <iostream> #include <iomanip> using namespace std int main() { int count, num long double sum = 0 do { cout << "Please enter a postive integer value: "
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: cin >> num }while(num < 1) for(count = 1 count <= num ++count) { sum += count s } cout << fixed << showpoint << sum << endl return 0 }...
View Full Document

This note was uploaded on 04/14/2008 for the course CSI 1430 taught by Professor Aars during the Spring '08 term at Baylor.

Ask a homework question - tutors are online