EasyManua.ls Logo

Casio Z-1 User Manual

Casio Z-1
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 #93 background imageLoading...
Page #93 background image
93
/* Quadratic equation */
/* #include <stdio.h> */
/* #include <math.h> */
main(){
double a,b,c,D,q,r;
scanf(“%lf %lf %lf“,&a,&b,&c);
D=b*b-4.0*a*c;
if (d>=0){
q=(-b+sqrt(D))/a/2.0;
r=(-b-sqrt(D))/a/2.0;
printf(“%If, %If¥n“,q,r);
}
else{
r=sqrt(-D)/a/2.0;
q=-b/a/2.0;
printf(“%lf+%lfi “,q,r);
printf(“%lf-%lfi¥n“,q,r);
}
}
The variables “a”, “b” and “c” correspond to the “a”, “b”, and “c” in the quadratic
equation, while the “D” variable is the “D” of the discriminant. Variables “q” and “r” are
used for the two solutions. Note that all of the variables are specified as “double”,
meaning that they are for double-precision floating point values.
Note that the % construction in the scanf() function is “%lf”. The “f” portion specifies a
floating-point value, while the “l” stands for long, and means that the integer part of
the value is longer than normal.
Relational operators
The condition “D>=0” is called a relational operator. This tells the computer to
compare the value assigned to variable “D” with 0. If the value of “D” is greater than
or equal to 0, a value of 1 (TRUE) is returned to indicate true. If it is less than zero, a
0 (FALSE) is returned to indicate false. The following are the other relational
operators that can be used with C.
Operator
Example
Meaning
>
<
>=
<=
==
!=
i>j
i<j
i>=j
i<=j
i==j
i!=j
True (1) if i is greater than j, false (0) if not.
True (1) if i is less than j, false (0) if not.
True (1) if i is greater than or equal to j, false (0) if i is less than j
True (1) if i is less than or equal to j, false (0) if i is greater than j
True (1) if i is equal to j, false (0) if not.
True (1) if i is not equal to j, false (0) if it is.

Table of Contents

Question and Answer IconNeed help?

Do you have a question about the Casio Z-1 and is the answer not in the manual?

Casio Z-1 Specifications

General IconGeneral
BrandCasio
ModelZ-1
CategoryDesktop
LanguageEnglish

Summary

1 Unit Configuration

1.1 General Guide

Overview of the calculator's physical layout, including key identification and basic functions.

1.2 Operational Functions

Detailed explanation of each key and its primary operational purpose on the device.

1.3 Symbol Display

Description and meaning of various symbols that appear on the calculator's display.

1.4 Keyboard

Layout of the keyboard, including keytop functions and usage of shift keys.

1.5 Screen

Characteristics of the LCD screen, including lines, editing, and contrast adjustment.

1.6 Display Characters

Table detailing character codes and their corresponding representations on the display.

1.7 Power Supply

Information regarding the unit's power sources and battery replacement procedures.

1.8 Auto Power Off

Explanation of the automatic power-off feature for energy saving.

1.9 SYSTEM* Self Test Function

Procedure for initiating and understanding the results of the built-in self-test.

2 Fundamental Operation

2.1 CAL Mode

Details on how to enter and utilize the primary calculation mode.

2.2 Formula Storage Function

Instructions for storing, recalling, and using frequently used formulas.

2.3 BASIC Mode

Introduction to BASIC programming, covering creation, editing, and execution.

2.4 C Mode

Introduction to C programming, covering creation, editing, and execution.

2.5 CASL Mode

Overview and introduction to the CASL programming language.

2.6 Assembler Mode

Overview and introduction to Assembler programming.

3 Calculation Function

3.1 Manual Calculation Preparations

Steps and preparations required before performing manual calculations.

3.2 Manual Calculation Input and Correction

Procedures for entering and correcting data during manual calculations.

3.3 Priority Sequence

Explanation of the order in which operations are evaluated in calculations.

4 Formula Storage Function

4.1 Utilization for Preparing Tables

How to use the formula storage function to generate data tables.

5 BASIC Programming

5.1 Features of BASIC

Key characteristics, advantages, and capabilities of the BASIC language.

5.2 BASIC Program Configuration

Details on the structure and standard format of BASIC programs.

5.3 BASIC Program Input

Step-by-step instructions for entering and preparing BASIC programs.

5.3.3 Program Editing

Methods and procedures for editing existing BASIC programs.

5.4 BASIC Program Execution

Guidance on running, debugging, and handling errors in BASIC programs.

5.5 Commands

Reference for fundamental and commonly used BASIC commands.

5.6 Operators

Explanation of arithmetic, relational, and logical operators in BASIC.

5.7 Constants and Variables

Definition and usage rules for constants and variables in BASIC.

5.8 BASIC Command Reference

A comprehensive reference section for all BASIC commands.

6 C Programming

6.1 The Basics of C

Introduction to the C language, its history, features, and advantages.

6.2 C Program Input

Detailed guide on creating, editing, and executing C programs.

6.3 C Command Reference

Reference for C language commands, functions, and syntax.

6.4 C Commands Index

An alphabetical index of C commands and their corresponding page numbers.

Related product manuals