3rd Class: if Statement In C++ - MeraForum Community.No 1 Pakistani Forum Community

MeraForum Community.No 1 Pakistani Forum Community

link| link| link
MeraForum Community.No 1 Pakistani Forum Community » The World of Information » Computer and Information Technology » C++ » 3rd Class: if Statement In C++
C++ All Programs of C++ Languages

Advertisement
 
Post New Thread  Reply
 
Thread Tools Display Modes
(#1)
Old
Morash's Avatar
Morash Morash is offline
 


Posts: 17,781
My Photos: ()
Country:
Star Sign:
Join Date: Jul 2010
Location: ▌║█║▌│█│║▌║
Gender: Male
cool 3rd Class: if Statement In C++ - >>   Show Printable Version  Show Printable Version   Email this Page  Email this Page   04-09-2014, 07:23 PM



If Statement In C++



The if statement Is Used To Execute Or Ignore A Set Of Statements After Testing A Give Condition.
If The Given Condition Is True The Following Statement Will Be Executed Otherwise Will Be Ignored
And The Control Will Transfer To The Next Statement.


Syntax:

if(condition)
{
Statement1;
}





Example







Output (Condition True, Statement Executed)







Output (Condition False, Statement Ignored)




 





bE driveN wiTh puRpOse, Be r313n71355 in your alιgnмenт;
with excellence.
pAy n0 mInd to the ∂ιsιмραssισηε∂ เ๓ק๏tєภt ђคtєгร

.. нoolιgan
Reply With Quote Share on facebook
Sponsored Links
(#2)
Old
AYAZ's Avatar
AYAZ AYAZ is offline
 


Posts: 12,370
My Photos: ()
Country:
Star Sign:
Join Date: Aug 2008
Location: Karachi
Gender: Male
Default Re: 3rd Class: if Statement In C++ - >>   Show Printable Version  Show Printable Version   Email this Page  Email this Page   04-09-2014, 09:24 PM

Thanks morash, I am going to try this one.

I have one question, where is else ? like it's if-else ladder? or it's just if statement with printout something and not using else?

 







ALLAH FARMATA HAI :
AEY BANDEY JO HUA
WO ACHA HUA .
JO HORAHA HAI ACHA HO RAHA HAI.
JO HOGA WO BHI ACHA HOGA.
TERA KIYA GAIYA JO TU ROTA HAI
TU KIA LAYA JO TU NE KHO DIYA.
JO LIYA YAHIN (DUNYA) SEI LIYA
JO DIYA YAHIN (DUNYA) PE DIYA
JO AAJ TERA HAI PEHLAY KISI AUR KA THA
AUR KAL KISI AUR KA HOGA.
TABDEELI KAINAAT KA MAMOOL HAI
BAS TU WO JAMA KAR JO TU SATH LEI KAR JANEY WALA HAI
YANI NAIK AMAAL.


(#3)
Old
Morash's Avatar
Morash Morash is offline
 


Posts: 17,781
My Photos: ()
Country:
Star Sign:
Join Date: Jul 2010
Location: ▌║█║▌│█│║▌║
Gender: Male
Default Re: 3rd Class: if Statement In C++ - >>   Show Printable Version  Show Printable Version   Email this Page  Email this Page   04-09-2014, 09:35 PM

Ye Simple If Statement Hai Ayaz!
Next If Else, Then Nested If Else Statements Hai, Wo Bhi Share Karing ..

 





bE driveN wiTh puRpOse, Be r313n71355 in your alιgnмenт;
with excellence.
pAy n0 mInd to the ∂ιsιмραssισηε∂ เ๓ק๏tєภt ђคtєгร

.. нoolιgan
(#4)
Old
pakeeza's Avatar
pakeeza pakeeza is offline
 


Posts: 28,336
My Photos: ()
Country:
Star Sign:
Join Date: Jan 2012
Location: Maa ki duaon mey
Gender: Female
Default Re: 3rd Class: if Statement In C++ - >>   Show Printable Version  Show Printable Version   Email this Page  Email this Page   04-10-2014, 11:49 AM

Good sharing usefull ha ye thnks

 



Be Positive... Everything Gonna be Alright

(#5)
Old
Akash Akash is offline
The Bold And Beautiful
 


Posts: 1,111
My Photos: ()
Country:
Star Sign:
Join Date: Feb 2014
Location: Peshawar
Gender: Male
Default Re: 3rd Class: if Statement In C++ - >>   Show Printable Version  Show Printable Version   Email this Page  Email this Page   04-10-2014, 01:10 PM

Thanx For Sharing

 






(#6)
Old
AYAZ's Avatar
AYAZ AYAZ is offline
 


Posts: 12,370
My Photos: ()
Country:
Star Sign:
Join Date: Aug 2008
Location: Karachi
Gender: Male
Default Re: 3rd Class: if Statement In C++ - >>   Show Printable Version  Show Printable Version   Email this Page  Email this Page   04-12-2014, 01:28 AM

I made this program, took my time.due to one mistake.

I was typing If instead of if .

Case sensitive is something hard to follow in programming languages.

 







ALLAH FARMATA HAI :
AEY BANDEY JO HUA
WO ACHA HUA .
JO HORAHA HAI ACHA HO RAHA HAI.
JO HOGA WO BHI ACHA HOGA.
TERA KIYA GAIYA JO TU ROTA HAI
TU KIA LAYA JO TU NE KHO DIYA.
JO LIYA YAHIN (DUNYA) SEI LIYA
JO DIYA YAHIN (DUNYA) PE DIYA
JO AAJ TERA HAI PEHLAY KISI AUR KA THA
AUR KAL KISI AUR KA HOGA.
TABDEELI KAINAAT KA MAMOOL HAI
BAS TU WO JAMA KAR JO TU SATH LEI KAR JANEY WALA HAI
YANI NAIK AMAAL.


(#7)
Old
AYAZ's Avatar
AYAZ AYAZ is offline
 


Posts: 12,370
My Photos: ()
Country:
Star Sign:
Join Date: Aug 2008
Location: Karachi
Gender: Male
Default Re: 3rd Class: if Statement In C++ - >>   Show Printable Version  Show Printable Version   Email this Page  Email this Page   04-12-2014, 01:30 AM

Morash one thing wanted to ask is that what is the different between int and string

what if we take

string num;

rather than

int num;

Let me know please thanks

 







ALLAH FARMATA HAI :
AEY BANDEY JO HUA
WO ACHA HUA .
JO HORAHA HAI ACHA HO RAHA HAI.
JO HOGA WO BHI ACHA HOGA.
TERA KIYA GAIYA JO TU ROTA HAI
TU KIA LAYA JO TU NE KHO DIYA.
JO LIYA YAHIN (DUNYA) SEI LIYA
JO DIYA YAHIN (DUNYA) PE DIYA
JO AAJ TERA HAI PEHLAY KISI AUR KA THA
AUR KAL KISI AUR KA HOGA.
TABDEELI KAINAAT KA MAMOOL HAI
BAS TU WO JAMA KAR JO TU SATH LEI KAR JANEY WALA HAI
YANI NAIK AMAAL.


(#8)
Old
Morash's Avatar
Morash Morash is offline
 


Posts: 17,781
My Photos: ()
Country:
Star Sign:
Join Date: Jul 2010
Location: ▌║█║▌│█│║▌║
Gender: Male
Default Re: 3rd Class: if Statement In C++ - >>   Show Printable Version  Show Printable Version   Email this Page  Email this Page   04-12-2014, 01:40 AM

Case Sensitivity Is Not Hard To Deal With!
Ajkal Jitne Bhi Editors Arahe Hai Os Mai Koi Word Capital Ya Small Likho To Osi Time Indicate Karta Hai ..

 





bE driveN wiTh puRpOse, Be r313n71355 in your alιgnмenт;
with excellence.
pAy n0 mInd to the ∂ιsιмραssισηε∂ เ๓ק๏tєภt ђคtєгร

.. нoolιgan
(#9)
Old
Morash's Avatar
Morash Morash is offline
 


Posts: 17,781
My Photos: ()
Country:
Star Sign:
Join Date: Jul 2010
Location: ▌║█║▌│█│║▌║
Gender: Male
Default Re: 3rd Class: if Statement In C++ - >>   Show Printable Version  Show Printable Version   Email this Page  Email this Page   04-12-2014, 01:48 AM

Quote:
Originally Posted by AYAZ View Post
Morash one thing wanted to ask is that what is the different between int and string

what if we take

string num;

rather than

int num;

Let me know please thanks
Agar Ap int Type Variable Loge To Os Mai Ap Just NUMBER He Le Sakte Ho ..
And Agar Ap string Type Variable Loge Os Mai Ap char+int Dono Le Sakte Ho ..
Like String Mai Ap Number Bhi De Sakte Ho And Character Bhi ..

 





bE driveN wiTh puRpOse, Be r313n71355 in your alιgnмenт;
with excellence.
pAy n0 mInd to the ∂ιsιмραssισηε∂ เ๓ק๏tєภt ђคtєгร

.. нoolιgan
(#10)
Old
AYAZ's Avatar
AYAZ AYAZ is offline
 


Posts: 12,370
My Photos: ()
Country:
Star Sign:
Join Date: Aug 2008
Location: Karachi
Gender: Male
Default Re: 3rd Class: if Statement In C++ - >>   Show Printable Version  Show Printable Version   Email this Page  Email this Page   04-12-2014, 08:18 PM

Quote:
Originally Posted by Morash View Post
Agar Ap int Type Variable Loge To Os Mai Ap Just NUMBER He Le Sakte Ho ..
And Agar Ap string Type Variable Loge Os Mai Ap char+int Dono Le Sakte Ho ..
Like String Mai Ap Number Bhi De Sakte Ho And Character Bhi ..
You mean hum int sei input only number lei saktey hie.

Aur string sei hum input main number+character dono lei saktey hie.

Correct?

 







ALLAH FARMATA HAI :
AEY BANDEY JO HUA
WO ACHA HUA .
JO HORAHA HAI ACHA HO RAHA HAI.
JO HOGA WO BHI ACHA HOGA.
TERA KIYA GAIYA JO TU ROTA HAI
TU KIA LAYA JO TU NE KHO DIYA.
JO LIYA YAHIN (DUNYA) SEI LIYA
JO DIYA YAHIN (DUNYA) PE DIYA
JO AAJ TERA HAI PEHLAY KISI AUR KA THA
AUR KAL KISI AUR KA HOGA.
TABDEELI KAINAAT KA MAMOOL HAI
BAS TU WO JAMA KAR JO TU SATH LEI KAR JANEY WALA HAI
YANI NAIK AMAAL.


Post New Thread  Reply

Bookmarks

Tags
3rd, class, statement

« Previous Thread | Next Thread »
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
CNG sector reacts sharply to minister’s statement Morash General Discussion 6 11-01-2013 03:30 PM
I waz in class 7th ღƬαsнι☣Rασ™ Jokes 2 05-09-2013 09:47 AM
Best Statement By Sheikh Rashid mcitp-it Amazing Videos 0 05-28-2012 07:18 PM
Open Heart Surgery Unit ke ke bahir likha hoa statement: Evolution Funny Sms 2 11-30-2011 06:50 PM


All times are GMT +5. The time now is 07:52 PM.
Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.

All the logos and copyrights are the property of their respective owners. All stuff found on this site is posted by members / users and displayed here as they are believed to be in the "public domain". If you are the rightful owner of any content posted here, and object to them being displayed, please contact us and it will be removed promptly.

Nav Item BG