How to a program by using condition and how to apply it?

Asked by Last Modified  

15 Answers

+1 Computer Engineering Diploma

Follow 0
Answer

Please enter your answer

Computer & Maths Wizard

If(condition) statement;
Comments

Computer Expert

You should use conditional statement i.e if else ,nested if ,switch case,looping etc depending on your program
Comments

Software Engineer as Lecturer

You want write a program using conditions, that's how I understood. I will write a simple C program for you with if-condition. int main() { int a=10; if(a==10) { printf("The value of A is 10\n"); } else { ...
read more
You want write a program using conditions, that's how I understood. I will write a simple C program for you with if-condition. int main() { int a=10; if(a==10) { printf("The value of A is 10\n"); } else { printf("The value of A is not equal to 10\n"); } return(0); } The above program checks whether A is 10 or not using if-condition and prints "The value of A is 10" if A=10 else it prints "The value of A is not equal to 10" . read less
Comments

Computer language and mathematics tutor

We can use condition in many instance. There are so many conditions in Java, for instance, "IF","Switch", nested If, IF ELSE. Example int a=10; if(a <20) { System.out.println("a is lesser than 20") } else { System.out.println("a is lesser than 20") }
Comments

Computer Science Expert

Every Computer language provides a support for Logical Condition checks,Loops,etc. Pick any language and can check how conditional handling is done. For more details or information feel free to contact me at ankit.mishra100 gmail.com
Comments

Sorry to let you down. My focus is in Civil Engineering only. Please refer other tutors for your answer.
Comments

Mathematics and computer science Professor with 17 years Teaching Experience

Its depend upon the Programs. there are several condition in C/C++. I mention the Syntax: 1. if(Condition) { Statement; } else { Statement;} 2. if(Condition) { Statement; } elseif(Condtion) { Statement;} 3. for(Initialization; Condition; Increment) { Statements;} 4. while(Condition) { Statement;} 5....
read more
Its depend upon the Programs. there are several condition in C/C++. I mention the Syntax: 1. if(Condition) { Statement; } else { Statement;} 2. if(Condition) { Statement; } elseif(Condtion) { Statement;} 3. for(Initialization; Condition; Increment) { Statements;} 4. while(Condition) { Statement;} 5. do{ Statements;} while(condition) If you go to refer Book: Yeswant Kanithkar C programming. read less
Comments

Computer Trainer

Please mention about which condition you are talking about. There are following conditional statements are there in C depending upon flow control i.e branching statements & looping statements. Branching statements 1.if 2.if-else 3.else-if 4.goto looping statements 1.while 2.for 3.do-while EX: if-else...
read more
Please mention about which condition you are talking about. There are following conditional statements are there in C depending upon flow control i.e branching statements & looping statements. Branching statements 1.if 2.if-else 3.else-if 4.goto looping statements 1.while 2.for 3.do-while EX: if-else statement if(a>b) { printf("a is greater"); else printf("b is greater"); } read less
Comments

Computer programming teacher

specify conditional statements if, else, while
Comments

sry my focus is mainly on ece subjects
Comments

View 13 more Answers

Related Lessons

C programming language basics easy way to learn
Computer - HardwareHardware represents the physical and tangible components of a computer, i.e. the components that can be seen and touched.Examples of Hardware are the following −Input devices −...

Problem on limits
Let's solve a problem on limits Find limit: x→0 (1 - cos2x ) /(x²) On direct substitution we get 1 - 1/0 = 0/0 which is in indeterminate form Let's substitute (1 - cos 2x ) = 2 sin²...

SI Units
The name SI is abbreviation for Système International d’Unités for the International System of units. The 14th General Conference on Weights and Measures held in 1971, adopted seven...

FBD : Free Body Diagram (Mechanical Engineering)
Free body diagram is the graphical representation of forces (Action and Reaction) acting on isolated body or any objects. it is very basic and most useful concept to solve any structural probleme (can...

Coding
Think Before You Do.. Invent Something.. Create Products that will be useful of People Across the Globe... Write Efficient CODE... CODE CODE CODE.. Write Logics...

Recommended Articles

Quality education does not only help children to get a successful career and life, but it also hugely contributes to society. The formal education of every child starts from school. Although there are numerous schools, parents find it challenging to choose the right one that would fit their child. It is difficult for them...

Read full article >

With the current trend of the world going digital, electronic renaissance is a new movement that is welcomed by the new generation as it helps makes the lives of millions of people easier and convenient. Along with this rapidly changing movement and gaining popularity of Internet, e-Learning is a new tool that emerging...

Read full article >

While schools provide formal education to the children, the home is where they start learning about things informally. Parents think that schools will take the initiative to educate their children. Well, this is partially true, as parents also play an essential role in bringing up their child. For the development of particular...

Read full article >

With the mushrooming of international and private schools, it may seem that the education system of India is healthy. In reality, only 29% of children are sent to the private schools, while the remaining head for government or state funded education. So, to check the reality of Indian education system it is better to look...

Read full article >

Looking for Engineering Diploma Tuition ?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you