Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

C++ Else If

int time = 22;
if (time < 10) {
  cout << "Good morning.";
} else if (time < 20) {
  cout << "Good day.";
} else {
  cout << "Good evening.";
}
// Outputs "Good evening."
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #Else #If
ADD COMMENT
Topic
Name
7+9 =