Welcome to Dream.In.Code
Become a C++ Expert!

Join 136,921 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,777 people online right now. Registration is fast and FREE... Join Now!




if else 1nd nested if else statements

 
Reply to this topicStart new topic

if else 1nd nested if else statements, program havingifelse and nested ifelse statements

sad
17 Mar, 2008 - 10:26 AM
Post #1

New D.I.C Head
*

Joined: 17 Mar, 2008
Posts: 1

plz send me any simple program in c or c++ using if else and nested if else statements
User is offlineProfile CardPM
+Quote Post

Amadeus
RE: If Else 1nd Nested If Else Statements
17 Mar, 2008 - 10:48 AM
Post #2

g++ -o drink whiskey.cpp
Group Icon

Joined: 12 Jul, 2002
Posts: 12,228



Thanked: 40 times
Dream Kudos: 25
My Contributions
Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.

Post your code like this: code.gif

Thanks.
User is offlineProfile CardPM
+Quote Post

Martyr2
RE: If Else 1nd Nested If Else Statements
17 Mar, 2008 - 10:50 AM
Post #3

Programming Theoretician
Group Icon

Joined: 18 Apr, 2007
Posts: 5,231



Thanked: 220 times
Expert In: C/C++, Java, VB, VB.NET, C#, PHP, Web Development, HTML & CSS, Javascript

My Contributions
cpp


// If else statements nested on finding your solution.
if ((!search) || (!lookatsnippets) || (!readthec++board)) {
cout << "Will never find anything you are looking for on if else statements" << endl;
}
else {
if (you.doAction() == "do the Research") {
cout << "Success in finding nested if statements!" << endl;
}
else {
cout << "Perhaps got an example but learned nothing!" << endl;
}
}


I hope this helps! smile.gif
User is online!Profile CardPM
+Quote Post

Amadeus
RE: If Else 1nd Nested If Else Statements
17 Mar, 2008 - 10:54 AM
Post #4

g++ -o drink whiskey.cpp
Group Icon

Joined: 12 Jul, 2002
Posts: 12,228



Thanked: 40 times
Dream Kudos: 25
My Contributions
I like it!
User is offlineProfile CardPM
+Quote Post

spearfish
RE: If Else 1nd Nested If Else Statements
17 Mar, 2008 - 11:02 AM
Post #5

Monkey in Training
Group Icon

Joined: 10 Mar, 2008
Posts: 746



Thanked: 2 times
Dream Kudos: 225
My Contributions
Martyr you forgot the if else statements.
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: If Else 1nd Nested If Else Statements
17 Mar, 2008 - 11:03 AM
Post #6

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 8,998



Thanked: 126 times
Dream Kudos: 8625
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
Great example Marty!
User is online!Profile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/3/08 10:13PM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month