Please post a complete code ...
How to write a summation in a sequence? C++ 2011-12View more random threads:
- Why we use iostream.h in our program?
- C++ Win32 How to Play Music July 2011
- Constructor for Composition of inherited classin c++ 2011
- this pointer in c++
- overloading and polymorphism in c++
- Linklist Data Structure
- Linked list using arrays?
- security and privacy in c
- What is Array meaning in C++ and Java 2011
- Pointers are not accessible for static member funcion
Code:Here's what I got: else if (choice == 3) { int a=2; int b=1; int c=3; int bound, sum, i; cout << "Plese enter the upper bound of the summation you are looking for:" << endl; cin>>bound; if (bound< 0) cout << "Only Posiive Numbers are accepted\n\n"; else{ for(i=1;c<=sum;i++) { a=b; b=c; c=a+b; sum=sum+c; } cout << sum << " is the summation of all numbers until " << bound << endl; } }
Please post a complete code ...
Complete code of what?
Sponsored Links
Urgent call: 03455242488. | Virtual University Assignments
Virtual University GDBs | Virtual University Papers | Vu Projects | Vu Handouts
About Expert
There are currently 1 users browsing this thread. (0 members and 1 guests)