Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Remove all the unnecessary tests from the nested conditional statement below.

52 views
Skip to first unread message

محمد رجب‎

unread,
Mar 20, 2015, 8:49:05 AM3/20/15
to
float income;
cout << "Enter your monthly income: ";
cin >> income;
if (income < 0.0)
cout << "You are going farther into debt every month." << endl;
else if (income >= 0.0 && income < 1200.00)
cout << "You are living below the poverty line." << endl;
else if (income >= 1200.00 && income < 2500.00)
cout << "You are living in moderate comfort." << endl;
else if (income >= 2500.00)
cout << "You are well off." << endl;

Victor Bazarov

unread,
Mar 20, 2015, 10:00:53 AM3/20/15
to
This used to be covered in FAQ 5.2... I can't locate it in its old
place anymore, sorry. After redoing the C++ FAQ, the section on how to
post is empty. Well, too bad. I found the mirror, though. Check it
out (and keep the link for your convenience):
http://www-igm.univ-mlv.fr/~dr/CPP/c++-faq/index.html

V
--
I do not respond to top-posted replies, please don't ask

red floyd

unread,
Mar 20, 2015, 1:38:11 PM3/20/15
to
On 3/20/2015 7:00 AM, Victor Bazarov wrote:
> On 3/20/2015 8:48 AM, محمد رجب wrote:
>> [blatant "do my homework" redacted]
>
> This used to be covered in FAQ 5.2... I can't locate it in its old
> place anymore, sorry. After redoing the C++ FAQ, the section on how to
> post is empty. Well, too bad. I found the mirror, though. Check it
> out (and keep the link for your convenience):
> http://www-igm.univ-mlv.fr/~dr/CPP/c++-faq/index.html
>


Victor, the FAQ is still at Parashift.

http://www.parashift.com/c++-faq-lite/


Victor Bazarov

unread,
Mar 20, 2015, 1:53:33 PM3/20/15
to
Yes. Please find 5.2 in it and explain how you did it here. Thanks!

red floyd

unread,
Mar 20, 2015, 5:58:55 PM3/20/15
to
You're right, it's insanely difficult to find. I have no idea why
Marshall did the rearrangement.

However, it is here: http://isocpp.org/wiki/faq/how-to-learn-cpp

At the bottom of the page.

For some reason, it's under the "Learning OO/C++" link. I really think
Marshall should put the netiquette page back.


Victor Bazarov

unread,
Mar 20, 2015, 7:30:30 PM3/20/15
to
On 3/20/2015 5:58 PM, red floyd wrote:
> On 3/20/2015 10:53 AM, Victor Bazarov wrote:
>> On 3/20/2015 1:37 PM, red floyd wrote:
>>> On 3/20/2015 7:00 AM, Victor Bazarov wrote:
>>>> On 3/20/2015 8:48 AM, محمد رجب wrote:
>>>>> [blatant "do my homework" redacted]
>>>>
>>>> This used to be covered in FAQ 5.2... I can't locate it in its old
>>>> place anymore, sorry. After redoing the C++ FAQ, the section on how to
>>>> post is empty. Well, too bad. I found the mirror, though. Check it
>>>> out (and keep the link for your convenience):
>>>> http://www-igm.univ-mlv.fr/~dr/CPP/c++-faq/index.html
>>>>
>>>
>>>
>>> Victor, the FAQ is still at Parashift.
>>>
>>> http://www.parashift.com/c++-faq-lite/
>>
>> Yes. Please find 5.2 in it and explain how you did it here. Thanks!
>
> You're right, it's insanely difficult to find. I have no idea why
> Marshall did the rearrangement.
>
> However, it is here: http://isocpp.org/wiki/faq/how-to-learn-cpp
>
> At the bottom of the page.

Thanks!

> For some reason, it's under the "Learning OO/C++" link. I really think
> Marshall should put the netiquette page back.

.. or at least make it possible to search for.
0 new messages