EasyManua.ls Logo

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 #87 background imageLoading...
Page #87 background image
87
Note that there is a direct relationship with
the 1
st
% construction and the 2
nd
argument
the 2
nd
% construction and the 3
rd
argument
the 3
rd
% construction and the 4
th
argument.
printf(“D=%d H=%x F=%f¥n”65,65,65.0);
You just have to be careful to ensure that the proper % construction is matched with
the proper value, or else you will get strange results. Here is a list of some other %
constructions in addition to those noted above.
% construction
Output
%d
%x
%f
%s
%c
decimal integer
hexadecimal integer
floating point
string
single character
Now, let’s enter the RUN command to execute our program and look at the result.
.R U N . .
>run
D=65 H=41 F=65.000000
>_
Here we can see that the decimal equivalent of 65 is 65, the hexadecimal equivalent
is 41, and the floating-point equivalent is 65.000000.
Integer notation in C
In the previous program, the decimal value 65 was converted in accordance with
three corresponding % constructions. In some instances, however, you might want to
include the actual values as they are in printf() arguments, without conversion when
they are displayed. To do this, you have to specify the value as an integer constant.
With C, you can specify decimal, octal and hexadecimal values, as well as characters
as integer constant. Use the following formats to specify values or characters of
integer constants.
65 – displayed as decimal integer 65
0101 – displayed as octal value 101. Include 0 in the first digit of an octal value
to specify it as an integer constant.
0x41 – displayed as hexadecimal value 41. Include 0x in the first two digits of a
hexadecimal value to display it as an integer constant.
‘A’ – displayed as a single character. Include the character in single quotes.
If you go back to our last program and change the printf() arguments as noted below:
/* Output Value V2 */
main(){
printf(“D=%d O=%o H=%x C=%c¥n”65,0101,0x41, ‘A’);
}

Table of Contents

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

Summary

Unit Configuration

Operational Functions

Details the primary keys and their functions, including power, shift, and numeric keys.

Keyboard Layout

Describes the arrangement of keys and how to access different functions.

Power and System Features

Power Supply and Battery Replacement

Provides instructions for replacing the calculator's batteries.

Fundamental Operation Modes

CAL Mode

Describes the primary calculation mode active upon power-on.

Formula Storage Function

Explains how to store and recall mathematical formulas for repeated calculations.

Programming Modes

Introduces BASIC, C, CASL, and Assembler modes for programming.

Calculation Functions

Manual Calculation Input and Correction

Guides on entering and correcting arithmetic and function calculations.

BASIC Programming

Features of BASIC

Highlights the advantages and capabilities of the BASIC language.

BASIC Program Input

Provides steps for entering and preparing BASIC programs.

BASIC Program Execution

Details how to run BASIC programs and handle execution errors.

BASIC Variables and Commands

Variables

Explains numeric, string, and array variables in BASIC.

BASIC Command Reference

A comprehensive reference for BASIC commands and functions.

BASIC Command Reference Details

Mathematical Functions

Reference for ABS, ACS, ANGLE, COS, SIN, SQR, TAN, etc.

BASIC String and Graphical Functions

C Programming Introduction

Learning C with Pocket Computer

Guidance on using the pocket computer as a C learning tool.

Meet the Casio C Interpreter

Introduces the C interpreter and its operation compared to compilers.

C Program Input Procedures

Using the C Editor

Details on creating and editing C source code.

C Program Execution

C Programming Essentials

Variable Types and Operations

Covers C data types (char, int, float, double) and assignments.

Selection Statements

Explains the 'if' and 'if-else' statements for conditional logic.

C Control Flow and Functions

Using Loops

Details 'while', 'do-while', and 'for' loops for repetitive execution.

Defining Functions

Explains how to create and use custom functions in C.

C Constants, Variables, and Operators

Constants and Variables

Covers variable scope, types, and storage.

C Operators and Command Reference

Operators

Lists and explains C operators and their precedence.

C Command Reference

Reference for C commands like RUN, EDIT, TRON, TROFF.

C Command Reference Details

String Functions

Reference for strcat, strchr, strcmp, strcpy, strlen.

Related product manuals