answersLogoWhite

0

Unlike a logical IF where the control expression is Boolean and has two branches depending on whether the expression evaluates true or false, the control expression of an arithmetic IF is a numeric expression (such as x+y) and has three branches depending on whether that expression evaluates negative, zero or positive.

In languages that do not provide native support for arithmetic IF (such as C++), we can implement arithmetic IF using logical IF as follows, where z holds the result of the arithmetic expression (such as z=x+y):

if (z<0) {

// negative path

} else if (z==0) {

// zero path

} else {

// positive path

}

User Avatar

Wiki User

7y ago

What else can I help you with?

Related Questions

What are BASIC and FORTRAN?

BASIC and FORTRAN are computer programming languages.


What Was the first high-level programming language designed that could perform complex?

fortran


What is the meaning of FORTRAN?

FORTRAN is an abbreviation for FORmula TRANslation. It is a computer programming language.


What is meaning or FORTRAN in computer languages?

formula translation


What does Fortran 4 mean?

Fortran IV was a version of the Fortran programming language developed in the 1960's. It was widely accepted as a standard version of Fortran until the development of Fortran 66 which was itself largely based on Fortran iV.


Is Fortran a general purpose programming language?

Yes.


What has the author Robert C Nickerson written?

Robert C. Nickerson has written: 'Instructor's manual for Fundamentals of FORTRAN programming' 'Fundamentals of FORTRAN programming' -- subject(s): FORTRAN (Computer program language) 'Instructor's manual, COBOL programming' 'Fundamentals of programming in BASIC' -- subject(s): BASIC (Computer program language)


What has the author Tim Ward written?

Tim Ward has written: 'FORTRAN and the art of PC programming' -- subject(s): FORTRAN (Computer program language), Microcomputers, Programming


What year was the programming language FORTRAN released?

The first FORTRAN compiler, an optimizing compiler, was delivered in April, 1957.


When was the 1 programming language developed?

The firs't successful programming language was Fortran desgined by John Backus in 1957.


What are two types of programming languages?

C++, Perl, Fortran


What are three fundamental types of programming?

Basic, Fortran, and C