CE Home
Navigation
Go Back   CrazyEngineers Forum > CE : Technical Discussions > Computer Science & IT Engineering
Notices


Advertisements
Reply
 
LinkBack Thread Tools Display Modes

  #11 (permalink)
Old 1st April 2007, 07:28 PM
CE - Regular Member
 
reachrkata's Avatar
 
Join Date: 4th November 2006
I'm a Crazy Electronics Engineer
Posts: 85
Question Re: Problem: One line code to execute if && else statements simultaneously

I dont know about C++, but may be this works in C -

if (!(printf("TRUE"))
;
else
printf("FALSE");

Does the same also work in C++ using cout ?
reachrkata is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #12 (permalink)
Old 2nd April 2007, 11:44 AM
CE - Apprentice
 
Join Date: 26th March 2007
I'm a Crazy Electronics Engineer
Posts: 14
Default Re: Problem: One line code to execute if && else statements simultaneously

Hi DEP,
I hope it is just a Crazy question and should not comes in any part of programs.
Any way I will try one more time with a Old fassion of programming...

if (1)
{
looprintf("TRUE\n");
goto loop2;
}
else
{
goto loop;
loop2: printf("FALSE\n");
}

Is this acceptable., Letz c.

Thanks,
Mahesh Krishnan

Last edited by maheshkrishnan; 2nd April 2007 at 12:55 PM. Reason: change came in code
maheshkrishnan is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)
Old 3rd April 2007, 09:01 PM
DEP
CE - Enthusiast
 
DEP's Avatar
 
Join Date: 16th February 2007
Location: EARTH
I'm a Crazy information technology Engineer
Posts: 102
Send a message via Yahoo to DEP
Thumbs up Re: Problem: One line code to execute if && else statements simultaneously

Quote:
Originally Posted by maheshkrishnan View Post
Hi DEP,
I hope it is just a Crazy question and should not comes in any part of programs.
Any way I will try one more time with a Old fassion of programming...

if (1)
{
looprintf("TRUE\n");
goto loop2;
}
else
{
goto loop;
loop2: printf("FALSE\n");
}

Is this acceptable., Letz c.

Thanks,
Mahesh Krishnan


hie mahesh,

GREAT job !!! congratulations..
keep up the good work,your answer is acceptable.
__________________
To have a right to do a thing is not at all the same as to be right in doing it.
DEP is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)
Old 3rd April 2007, 09:05 PM
DEP
CE - Enthusiast
 
DEP's Avatar
 
Join Date: 16th February 2007
Location: EARTH
I'm a Crazy information technology Engineer
Posts: 102
Send a message via Yahoo to DEP
Thumbs up Re: Problem: One line code to execute if && else statements simultaneously

Quote:
Originally Posted by reachrkata View Post
I dont know about C++, but may be this works in C -

if (!(printf("TRUE"))
;
else
printf("FALSE");

Does the same also work in C++ using cout ?

hi reachrkata,

well your code is pretty cool and yes it works equally well in c++.
but there is a hitch. See the question eas to execute the statement following "if" and not the test condition of "if". i am not very much sure whether the code is acceptable but i will surely let you as early as possible.


but i must say GREAT WORK DONE.
regards,
DEP
__________________
To have a right to do a thing is not at all the same as to be right in doing it.
DEP is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT +5.5. The time now is 12:06 PM.
Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
Member comments are owned by the poster. Copyright © 2005-2008 CrazyEngineers.com. All rights reserved.

Advertisements