0% found this document useful (0 votes)
21 views3 pages

Fundamentals of Programming - Lab 3

Conditional statements, One condition with input, Limit decimal with one condition, Condition within a condition, Multiple conditions

Uploaded by

uriel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views3 pages

Fundamentals of Programming - Lab 3

Conditional statements, One condition with input, Limit decimal with one condition, Condition within a condition, Multiple conditions

Uploaded by

uriel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

LAB 3

Monday, September 19, 2022 8:03 AM

Legend: code normal text


https://app.diagrams.net/ = flowchart maker

Conditional

The syntax is:


Types Definition Syntax
if-else Used in singular condition if (condition) {
statement statements like yes or no //statement
}
else {
//statement
}
else-if if (condition) {
statement //statement
}
Else if (condition){
//statement
}
else {
//statement
}
if statement if (condition) {
//statement
}
if (condition) {
//statement
}

public class conditional1{


public static void main(String args[]){
Double temp = 38.0;
if(temp>=37.5){
System.out.println("!! You have a
fever !!");
}
else{
System.out.println("You are at a normal
temperature!");
}
}
}

One Conditional with Input

FUNDAMENTALS OF PROGRAMMING Page 1


Limit Decimal and One Conditional

Conditional Within A Conditional

Multiple Conditional

FUNDAMENTALS OF PROGRAMMING Page 2


FUNDAMENTALS OF PROGRAMMING Page 3

You might also like