EasyManuals Logo
Home>Casio>Desktop>FX-890P

Casio FX-890P User Manual

Casio FX-890P
126 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #113 background imageLoading...
Page #113 background image
113
if() else
PURPOSE: Executes one statement when the specified condition is true (not zero).
A second optional statement following the “else” is executed when the specified
condition is false (0).
FORMAT: if (condition) statement 1 else statement 2
PARAMETERS:
Condition can be any variable or expression that will be considered true if not 0.
EXPLANATION:
1. The most simple conditional structure is: if (condition) statement.
statement is executed only if condition is true (not 0)
2. You can add the else structure to process the case of condition being false
(0).
3. Statement 1 and statement 2 can be if() then structure as well, allowing
analyzing and processing multiple conditions.
4. The last else statement is often here to process unexpected entries or data
configurations, for example generating an error warning.
SAMPLE PROGRAM:
/* if() else example */
/* upper case only! */
/* #include <stdio.h> */
main(){
char c;
c=getchar();
if ((c>=’A’)&&(c<=’Z’) {
/* Process upper case */
. . .
}
else if((c>=’a’)&&(c<=’z’)){
/* Change case */
c-=32;
. . .
}
else {
printf(“%c is not a letter¥n,c);
}
}
SEE: switch() case break default

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Casio FX-890P and is the answer not in the manual?

Casio FX-890P Specifications

General IconGeneral
BrandCasio
ModelFX-890P
CategoryDesktop
LanguageEnglish

Related product manuals