Learn easy with esyteach computer basic language

Sunday, 7 May 2017

Arithmetic Statement in C language

Arithmetic Statement in C language is utilized as a part of three ways. Let’s consider these three sorts one by one.

Integer Mode Arithmetic Statement: All sorts of operands are used as a part of this kind of an arithmetic statement whether the number variable or integer constant. The whole number consistent can be comprehended by taking over these cases -

Example:
Int a, author, albert, code;
a = a+1;
author = albert*123 + code - 6754;

Real Mode Arithmetic Statement: All operands used as a part of this sort of arithmetic statement are either real constants or real variables. In the accompanying case, you can comprehend by taking a gander at them -

Example:

Float saee, basic, id, flow, loi;
saee = basic + 12.234/3.4*1.254;
Id = flow*loi/10.0;
Mixed mode arithmetic statement: In this kind of arithmetic statement there are a few operands are integers and few real. Following the example portrayed that case -


float pi, tine, folk, foy, avg;
int x, y, z, num;
pi = tine*foy*folk/10.0
avg = (x+y+z + num)/ 4;


In this way, you have understood that how we can compose instruction by 3 ways of using an arithmetic statement.

0 comments:

Post a Comment