15,876,991 members
Home / Discussions / C / C++ / MFC

# C / C++ / MFC

 Beginner's Question [modified] UKM_Student11-Sep-09 1:10 UKM_Student 11-Sep-09 1:10
 Re: Beginner's Question Mattias G11-Sep-09 1:13 Mattias G 11-Sep-09 1:13
 Re: Beginner's Question Richard MacCutchan11-Sep-09 1:32 Richard MacCutchan 11-Sep-09 1:32
 Re: Beginner's Question [modified] UKM_Student11-Sep-09 2:00 UKM_Student 11-Sep-09 2:00
 Re: Beginner's Question Adam Roderick J11-Sep-09 2:32 Adam Roderick J 11-Sep-09 2:32
 Re: Beginner's Question CPallini11-Sep-09 2:09 CPallini 11-Sep-09 2:09
 Re: Beginner's Question UKM_Student11-Sep-09 2:12 UKM_Student 11-Sep-09 2:12
 Re: Beginner's Question CPallini11-Sep-09 2:32 CPallini 11-Sep-09 2:32
 Your (revised) code ```#include using namespace std; int main() { int firstNum = 2, secondNum = 10; int k; int total = 0; k = firstNum + 1; if (k % 2 == 1) k++; while (k < secondNum) { total = total + k; k += 2; } cout << "c. The total sum of even integers between " << firstNum << " and " << secondNum << " is : " << total; }``` If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile. This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke [My articles]
 Re: Beginner's Question UKM_Student11-Sep-09 2:41 UKM_Student 11-Sep-09 2:41
 Re: Beginner's Question CPallini11-Sep-09 2:51 CPallini 11-Sep-09 2:51
 Re: Beginner's Question UKM_Student11-Sep-09 2:59 UKM_Student 11-Sep-09 2:59
 Re: Beginner's Question UKM_Student11-Sep-09 3:04 UKM_Student 11-Sep-09 3:04
 Re: Beginner's Question CPallini11-Sep-09 3:15 CPallini 11-Sep-09 3:15
 Re: Beginner's Question UKM_Student11-Sep-09 3:17 UKM_Student 11-Sep-09 3:17
 Re: Beginner's Question CPallini11-Sep-09 3:34 CPallini 11-Sep-09 3:34
 Re: Beginner's Question UKM_Student11-Sep-09 3:37 UKM_Student 11-Sep-09 3:37
 Re: Beginner's Question David Crow11-Sep-09 3:20 David Crow 11-Sep-09 3:20
 Re: Beginner's Question UKM_Student11-Sep-09 3:31 UKM_Student 11-Sep-09 3:31
 Re: Beginner's Question Richard MacCutchan11-Sep-09 3:25 Richard MacCutchan 11-Sep-09 3:25
 Re: Beginner's Question CPallini11-Sep-09 3:14 CPallini 11-Sep-09 3:14
 Re: Beginner's Question UKM_Student11-Sep-09 3:19 UKM_Student 11-Sep-09 3:19
 Re: Beginner's Question UKM_Student11-Sep-09 3:32 UKM_Student 11-Sep-09 3:32
 Detecting identical path names Mattias G11-Sep-09 1:08 Mattias G 11-Sep-09 1:08
 Re: Detecting identical path names `Randor` 11-Sep-09 1:30 `Randor` 11-Sep-09 1:30
 Re: Detecting identical path names Mattias G11-Sep-09 1:36 Mattias G 11-Sep-09 1:36
 Last Visit: 31-Dec-99 18:00     Last Update: 12-Apr-24 8:59 Refresh ᐊ Prev1...2625262626272628262926302631263226332634 Next ᐅ

General    News    Suggestion    Question    Bug    Answer    Joke    Praise    Rant    Admin

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.