0% found this document useful (0 votes)
154 views28 pages

C++ Programming Basics and Examples

The document provides examples of C++ programs demonstrating basic input/output, operators, conditional statements, and more. Some key points: - The first programs show taking input from the user and printing output to the screen. - Examples are given for arithmetic, relational, logical, assignment, pointer, and other operators. Programs demonstrate unary and binary operations. - Conditional statements like if-else and switch are covered. Programs check even/odd numbers, compare values, calculate bonuses based on years of service, and more. - One program uses if-else to determine letter case, while another uses if-else to assign a grade based on exam percentage ranges. In summary,

Uploaded by

Ashish Arora
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
154 views28 pages

C++ Programming Basics and Examples

The document provides examples of C++ programs demonstrating basic input/output, operators, conditional statements, and more. Some key points: - The first programs show taking input from the user and printing output to the screen. - Examples are given for arithmetic, relational, logical, assignment, pointer, and other operators. Programs demonstrate unary and binary operations. - Conditional statements like if-else and switch are covered. Programs check even/odd numbers, compare values, calculate bonuses based on years of service, and more. - One program uses if-else to determine letter case, while another uses if-else to assign a grade based on exam percentage ranges. In summary,

Uploaded by

Ashish Arora
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd

All programs in c++

********Some input output programs********

Q-1. My first program in c++ "welcome to the c++!".

/*my first program in c++ */

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
cout<<"Welcome to the c++!";
getch();
}

Q-2 WAP to take a value from the user and print on the screen.

#include<iostream.h>
#include<conio.h>
void main()
{
int a;
clrscr();
cout<<"Enter the value = ";
cin>>a;
cout<<"a = "<<a;
getch();
}

*********Operators in c++ *********

 Arithmetic Operators
 Relational Operators
 Logical Operators
 Assignment operators
 Pointer operators
 Special Operators
 Bitwise operators

**Arithmetic operators**

 Binary operator : - All the arithmetic operators are binary operators, since they operate
on two operands at a time.

Such as : -

-- Multiplication (*)
--Divison (/)
--Remainder (%)
--Addition (+)
--Subtraction (-)

Q 3: - WAP to take two values from user and perform all binary operations also print the
result on the screen.

#include<iostream.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
cout<<"Enter the value of a and b : - ";
cin >>a>>b;
c=a+b; //Addition
cout<<"\nsum = "<<c;

c=a-b; //Substraction
cout<<"\nSub = "<<c;

c=a*b; //Multiplication
cout<<"\nmul = "<<c;

c=a/b; //Divison
cout<<"\nDiv = "<<c;

c=a%b; //Remainder
cout <<"\nRem = "<<c;

getch();
}

 unary operator : - unary operators take just a single [Link] operand can be any
interger or floating point value.

Such as: -

-- Increament operators ( ++ ) Means add 1.

-Pre-increament operators
-Post-increament operators

-- Decreament operators ( - - ) Means Subtract 1.

-Pre-Decreament operators
-Post-Decreament operators

Q 4: -WAP to that perform unary operations like pre-increment ,post -increament,pre-


decreament,post - decreament operations on it and print the result side by side.

#include<iostream.h>
#include<conio.h>
void main()
{
int a=5,b=0;
clrscr();
b=b+(++a); //pre-increament b=0+(6) a=6,b=6
cout << "\n\nb = "<<b;

b=b+(a++); //post-increament b=6+(6) a=7,b=12


cout << "\n\nb = "<<b;

b=b+(--a); //pre -decreament b=12+(6) a=6,b=18


cout << "\n\nb = "<<b;

b=b+(a--); //post -decreament b=18+(6) a=7,b=24


cout << "\n\nb = "<<b;
getch();
}

Q 5 :- WAP to demonstrate the various increament and decrement operations.

#include<iostream.h>
#include<conio.h>
void main()
{
int a=0,b=0,c=0;
clrscr();
cout << "Initial value of a,b,c is "<<a<<" "<<b<<" "<<c;

a=(++b) + (++c);
cout<<"\n\n a = ++b + ++c = "<<a<<" "<<b<<" "<<c;

a=b++ + c++;
cout<<"\n\n a = b++ + c++ = "<<a<<" "<<b<<" "<<c;

a=++b + c++;
cout<<"\n\n a = ++b + c++ = "<<a<<" "<<b<<" "<<c;

a=b-- + c--;
cout<<"\n\n a = b-- + c-- = "<<a<<" "<<b<<" "<<c;

getch();
}

****Relational Operators****

The relational expressions give the value "1" for TRUE result and the value "0" for FALSE
result.
Such as: -

-- Greater than ( > )


-- Greater than or equal ( >= )
-- Less than (< )
-- Less than or equal ( <= )
-- Equal ( == )
-- Not equal ( != )

****Logical Operators****

The relational expressions give the value "1" for TRUE result and the value "0" for FALSE
result.

Such as :-

-- AND ( && )
-- OR ( || )
-- NOT ( ! )

****Assignment operators****

The assignment operator is represented by the equal sign (=).

Such as : -

a=a+b;

or

a+=b;

****Pointer Operator****

 Address of operators ( & ) : - It is returns the address of the variable,where


the variable is stored in the main memory of the
computer.

 Indirection operator ( * ) : - It is used to get the contents of the element or


cell.

Q-6: - WAP where pointer variable accept address of a variable and print the value of
variable using pointer as well as variable.

#include<iostream.h>
#include<conio.h>
void main()
{
int salary;
int *p;
salary=3000;
p=&salary;
cout<<"\n\nThe value of the salary is "<<salary;
cout<<"\n\nThe value pointed to is "<<*p;
*p=3333;
cout<<"\n\nThe value of salary is "<<salary;
getch();
}

****Special operators****

It is different kind of operators.

such as : -

 Conditional operator ( ?: )
 Comma operator ( , )
 Sizeof operator ( sizeof )

**Conditional operator**

Q-7 : - WAP where the value of the variable "b" is determined according to whether or not
the value of the variable "a" is greater than 25.

#include<iostream.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
cout<<"\n\nEnter the value of the variable a : - ";
cin>>a;
b=a>25 ? 100 : 99;
cout<<"\n\nThe value of the variable b is "<<b;
getch();
}

**Comma operator**

Q-8:- WAP to assign a value to a variable through second variable and change second
variable value simultanously using comma operator.

#include<iostream.h>
#include<conio.h>
#include<stdio.h>
void main()
{
int a,c=5;clrscr();
(a=c,c=7) ;
cout<<"value of a is "<<a;
cout<<"\n\nvalue of c is "<<c;
getch();
}

**Sizeof operator**

Q-9:- WAP to determine the size of int variable,character variable,and float variable.

#include<iostream.h>
#include<conio.h>
#include<stdio.h>
void main()
{
int a;
char b;
float c;
clrscr();
cout<<"sizeof a is "<<sizeof(a);
cout<<"\n\nsizeof b is "<<sizeof(b);
cout<<"\n\nsizeof c is "<<sizeof(c);
getch();
}

*********Conditional statements*********

Conditional branching , aprogram is to decide whether or not to execute the next statement based
on the resultant value of the current [Link] example, go to 2nd year,if you pass 1st year
exams,else repeat 1st year.

 If-Else statement
 Multiple if statements
 The if-else statement
 Nested if-else statements
 The switch statement

****If-Else statement****

In the if statement whenever evaluated condition comes out to be true,then the action s are
carried [Link], the given set of actions are ignored.

=> if (expression)
{
statement_1;
}

In the if-else statement whenever evaluated condition comes out to be true,then the action s are
carried [Link], the set of actions of else part will be execute.

=> if (expression)
{
statement_1;
}
else
{
statement_2;
}

Q 10: - WAP to check number is even or odd.

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int num;
cout << "\n\nEnter the number : - ";
cin >> num;
if(num%2==0)
{
cout<<"\n\nThe number is even";
}
else
{
cout<<"\n\nThe number is odd";
}
getch();
}
Q 11:- WAP to input two values and compare which is greater.

#include<iostream.h>
#include<conio.h>
void main()
{
int a,b;
cout<<"\n\nEnter two values : - ";
cin>>a>>b;
if(a>b)
{
cout<<"a is greater";
}
else
{
cout<<"b is greater";
}
getch();
}
Q-12: - WAP to take three values and compare which one greater.

#include<iostream.h>
#include<conio.h>
void main()
{
int a,b,c;
cout<<"\n\nEnter the three values : - ";
cin>>a>>b>>c;
if(a>b && a>c)
{
cout<<"\n\na is greater";
}
else if(b>c)
{
cout<<"\n\nb is greater";
}
else
{
cout<<"\n\nc is greater";
}
getch();
}
Q13:- Wap to calculate bonus,if the number of working years of employeeis greater then or
equal to 3
then a bonus of rs. 2500 is given to the employee.

#include<iostream.h>
#include<conio.h>
void main()
{
int yoj,cy,yos;
clrscr();
cout<<"\nEnter the current year : - ";
cin>>cy;
cout<<"\n\nEnter the year of joining : -";
cin >>yoj;
yos=cy-yoj;
if(yos>=3)
{
cout<<"\n\nYou will get bonus of rs 2500";
}
else
{
cout<<"\n\nSorry no bonus";
}
getch();
}

Q 14 : - WAp to input a character to confirm whether it is an alphabetic or not and if it is


an alpkabetic then check it is in lower case or upper case.

#include<iostream.h>
#include<conio.h>
void main()
{
char ch;
clrscr();
cout<<"\nEnter the alpahbetic character : - ";
cin>>ch;
if(ch>64&&ch<91)
{
cout<<"\n\nThe alphabet is a upper case letter";
}
else if(ch>96&&ch<124)
{
cout<<"\n\nThe alphabet is a lower case letter";
}
else
{
cout<<"\n\nThis is an alphabetic character";
}
getch();
}

Q15 : - WAP to calculate the percentage of total marks of student in five subjects and if

percentage grade

less then 50 fail


>=50 and <60 d
>=60 and <70 c
>=70 and <80 b
>80 a

#include<iostream.h>
#include<conio.h>
void main()
{
float marks;
float per;
clrscr();
cout<<"\nEnter the total marks of the student: - ";
cin>>marks;
per=(marks*100)/500;
if(per<50)
{
cout<<"\n\nFail";
}
else if(per>=50 && per<60)
{
cout<<"\n\ngrade d";
}
else if(per>=60 && per<70)
{
cout<<"\n\ngrade c";
}
else if(per>=70&&per<80)
{
cout<<"\n\ngrade b";
}
else
{
cout<<"grade a";
}

****Switch statement****
Instead of using the if-else-if ladder, the Switch statement is available for handling multiple
choice.

=> switch(variable)
{
case constant1 :
statement;
break;
case constant2 :
statement;
break;
case constant3 :
statement;
break;
.........
.........
.........
defalult :
statement;
}

Q 16: - WAP to input a number from 1 to 7 and display the name of the day(monday to
sunday).

#include<iostream.h>
#include<conio.h>
void main()
{
int num;
clrscr();
cout<<"\nEnter the number between 1 to 7: - ";
cin>>num;
switch(num)
{
case 1:
cout<<"\n\nmonday";
break;
case 2:
cout<<"\n\ntuesday";
break;
case 3:
cout<<"\n\nwednusday";
break;
case 4:
cout<<"\n\nthursday";
break;
case 5:
cout<<"\n\nfriday";
break;
case 6:
cout<<"\n\nsaturday";
break;
case 7:
cout<<"\n\nsunday";
break;
default:
cout<<"please enter between 1 to 7";
}
getch();
}

Q:-17:- WAP to make a calculator and perform arithmetic operations like


addition,substraction,multiplication,division.

#include<iostream.h>
#include<conio.h>
void main()
{
int ch,num1,num2,result;
float result1;
clrscr();
cout<<"\n\[Link]\n\[Link]\n\[Link]\n\[Link]";
cout<<"\n\nEnter your choice : -";
cin>>ch;
cout<<"\n\nEnter number 1 :- ";
cin>>num1;
cout<<"\n\nEnter number 2: -";
cin>>num2;
switch(ch)
{
case 1:
result=num1+num2;
cout<<"\n\nsum of numbers : - "<<result;
break;
case 2:
result=num1-num2;
cout<<"\n\nsub of numbers : - "<<result;
break;
case 3:
result=num1*num2;
cout<<"\n\nmultiplication of numbers : - "<<result;
break;
case 4:
result1=(float)num1/num2;
cout<<"\n\ndivision of numbers : - "<<result1;
break;
default:
cout<<"please enter between 1 to 4";
}
getch();
}

*********Loop constructor*********

The loop or iteration consruct,directs a program to perform a set of operations again and again
until
a specified condition is [Link] condition causes the termination of the loop.

 For loop
 While loop
 Do-while loop

****For loop****

For loop consruct is used to execute a set of statements for a given nuber of [Link] is a
shorthand
method for executing statements in a loop.

=> for(initial condition;test condition;incrementer or decrementer)


{
statement 1;
statement 2;
}

Q 18: -WAP to printing "hello world" 4 times.

#include<iostream.h>
#include<conio.h>
void main()
{
int i;
clrscr();
for(i=0;i<4;i++)
{
cout<<"hello world\n\n";
}
getch();
}

Q 19:- WAP to print 1 to 10 number.

#include<iostream.h>
#include<conio.h>
void main()
{
int i;
clrscr();
for(i=1;i<=10;i++)
{
cout<<i<<"\n\n";
}
getch();
}

Q 20: -WAP to input a number at show the table of that number.

#include<iostream.h>
#include<conio.h>
void main()
{
int i,num,a;
clrscr();
cout<<"\n\nEnter the number : -";
cin>>num;
for(i=1;i<=10;i++)
{
a=num*i;
cout<<"\n\n"<<num<<"x"<<i<<"="<<a;
}
getch();
}

Q 21:- WAP to obtain the factorial of a number entered by user.

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int fact=1,i,num;
cout << "\n\nEnter the number : - ";
cin >> num;
for(i=1;i<=num;i++)
{
fact=fact*i;
}
cout<<"factorial of a number : - "<<fact;
getch();
}

Q 22: - WAP to check no is prime or not.

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int num,i;
cout << "\n\nEnter the number : - ";
cin >> num;
for(i=2;i<num;i++)
{
if(num%i==0)
{
cout<<"\n\nThe number is not prime";
break;
}
}
if(num==i)
{
cout<<"\n\nNumber is prime.";
}
Q 23:- WAP to obtain the following outputs.

a). Fibonacci series : - 1 2 3 5 8 13 21 34

b). Gap series : - 0 1 3 6 10 15 21

c). Exponential series : - x - x^2+x^3-x^4+x^5-x^6


--- --- --- --- ---
2! 3! 4! 5! 6!

d). Prime no series : - 2 3 5 7 11

Ans: -

a).

#include<iostream.h>
#include<conio.h>
void main()
{
int size,a=0,b=1,c,i;
cout<< "\n\nEnter the size of the series : -";
cin >> size;
cout << "\n\n\t\t\t";

for(i=0;i<size;i++)
{
c=a+b;
cout <<" "<< c;
a=b;
b=c;
}
getch();
}

b).

#include<iostream.h>
#include<conio.h>
void main()
{
int size,a=0,b=0,c,i;
cout<< "\n\nEnter the size of the series : -";
cin >> size;
cout << "\n\n\t\t\t";

for(i=1;i<=size;i++)
{
c=a+b;
cout <<" "<< c;
b++;
a=c;
}
getch();
}

c).

#include<iostream.h>
#include<conio.h>
void main()
{
int size,a=0,b=0,c,i;
cout<< "\n\nEnter the size of the series : -";
cin >> size;
cout << "\n\n\t\t\t";

for(i=1;i<=size;i++)
{
c=a+b;
cout <<" "<< c;
b++;
a=c;
}
getch();
}

d).

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int j,num,i,size;
cout << "\n\nEnter the size : - ";
cin >> size;
for(i=2;i<size;i++)
{
for(j=2;j<size-1;j++)
{
if(i%j==0)
{
break;
}
}
if(i==j)
{
cout<<" "<<i;
}
}
getch();
}

Q 24: - WAP to obtain the folloeing outputs,

a). * b). * c). **** d). * * * *


** ** *** ***
*** *** ** **
**** **** * *
e). 1 f). A B C D C B A g). A h). 1
1 2 1 ABCBA BB 12
12321 ABA CCC 123
1234321 A BB 12
A 1

Ans: -

a).

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int size,j,i;
cout << "\n\nEnter the size of the series : - ";
cin >> size;
for(i=0;i<size;i++)
{
cout << "\n\t\t\t ";
for(j=0;j<=i;j++)
{
cout << "*";
}
}
getch();
}

b).

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int size,j,i;
cout << "\n\nEnter the size of the series : - ";
cin >> size;
;
for(i=0;i<size;i++)
{
cout << "\n\t\t\t ";
for(j=i;j<size;j++)
{
cout << " ";
}
for(j=0;j<=i;j++)
{
cout << "*";
}

c).

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int size,j,i;
cout << "\n\nEnter the size of the series : - ";
cin >> size;
;
for(i=0;i<size;i++)
{
cout << "\n\t\t\t ";
for(j=i;j<size;j++)
{
cout << "*";
}
}
getch();
}

d).

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int size,j,i;
cout << "\n\nEnter the size of the series : - ";
cin >> size;
;
for(i=0;i<size;i++)
{
cout << "\n\t\t\t ";
for(j=0;j<i;j++)
{
cout<<" ";
}
for(j=i;j<size;j++)
{
cout << "*";
}
}
getch();
}

e).

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int size,j,i,k;
cout << "\n\nEnter the size of the series : - ";
cin >> size;
for(i=1;i<=size;i++)
{
cout << "\n\t\t\t ";
for(j=i;j<size;j++)
{
cout<<" ";
}
for(j=1;j<=i;j++)
{
cout << j;
k=j;
}
for(j=1;j<i;j++)
{
k--;
cout<<k;
}
}
getch();
}

f).

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int size,j,i,k=64;
cout << "\n\nEnter the size of the series : - ";
cin >> size;
for(i=0;i<size;i++)
{
cout << "\n\t\t\t ";
for(j=0;j<i;j++)
{
cout << " ";
}
for(j=i;j<size;j++)
{
k++;
cout << (char)(k);
}
for(j=i;j<size-1;j++)
{
k--;
cout<<(char) (k);
}
k=64;
}
getch();
}
g).

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int size,j,i,k=64;
cout << "\n\nEnter the size of the series : - ";
cin >> size;
for(i=0;i<size;i++)
{
cout << "\n\t\t\t ";
for(j=0;j<i;j++)
{
cout << " ";
}
for(j=i;j<size;j++)
{
k++;
cout << (char)(k);
}
for(j=i;j<size-1;j++)
{
k--;
cout<<(char) (k);
}
k=64;
}
getch();
}

h).

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int size,j,i,k;
cout << "\n\nEnter the size of the series : - ";
cin >> size;
for(i=1;i<=size;i++)
{
cout << "\n\t\t\t ";
for(j=i;j<size;j++)
{
cout <<" ";
}
for(j=1;j<=i;j++)
{
cout<<(j);
}
}
for(i=1;i<size;i++)
{
cout << "\n\t\t\t ";
for(j=1;j<=i;j++)
{
cout << " ";
}
int k=1;
for(j=i;j<size;j++)
{
cout<<(k);
k++;
}
}
getch();
}

****While loop****

While loop construct contain the condition [Link] the condition is satisfied,the control
executes the statements following the while loop else,it ignores these statements.

=>While(condition)
{
statement1;
statement 2;
. . .. . . . .
}

Q 25: - WAP to input a five digit number and obtain the reverse of that number.

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
long result=0,i,num,rem;
cout << "\n\nEnter the number : - ";
cin >> num;
while(num!=0)
{
rem=num%10;
result=(result*10)+rem;
num=num/10;
}
cout<<"reverse of a number : - "<<result;
getch();
}

Q 26: - WAP to input a number and obtain the sum of the digits.

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
long num,rem,sum=0;
cout << "\n\nEnter the number : - ";
cin >> num;
while(num!=0)
{
rem=num%10;
sum+=rem;
num=num/10;
}
cout<<"Sum of digits : - "<<sum;
getch();
}

Common questions

Powered by AI

Switch statements in C++ allow for multi-way branching based on the value of a variable, executing the case that matches the variable's value. For example, a switch statement can be used to print the name of the day based on numbers 1 to 7. Unlike an if-else-if ladder, which evaluates conditions sequentially, switch cases are optimized to directly jump to the matched case, providing a potentially more efficient branching method .

Logical operators in C++ such as AND (&&), OR (||), and NOT (!) are used alongside relational operators to form complex conditional expressions. Relational operators (e.g., >, <, ==) compare operands and return Boolean results, which serve as inputs to logical operators for further evaluations. For instance, in checking if a number belongs in an alphabetic range or determining if a numerical input meets specific conditions like "if(a>b && a>c) { ... }" for comparison and decision making .

C++ supports various loop constructs to facilitate repetitive tasks. For example, the 'for' loop can iterate over a range, like printing numbers 1 to 10: "for(i=1;i<=10;i++) { cout<<i<<"\n"; }". A 'while' loop iterates as long as a condition is true, such as reversing a number by continuously shifting digits: "while(num!=0) { ... }". 'do-while' loops execute at least once, often used when the loop needs execution before re-evaluation of conditions .

C++ uses ASCII value comparisons to evaluate if a character input is alphabetical. This involves checking if the character's ASCII value falls within the alphabetic range. For distinguishing, "if(ch>64&&ch<91)" detects uppercase letters, while "else if(ch>96&&ch<124)" identifies lowercase letters, ensuring comprehensive evaluation of character categories .

In C++, the 'sizeof' operator is used at compile time to determine the size of a data type or a variable in bytes. It is invaluable for memory management and optimization. For instance, "cout<<"sizeof a is "<<sizeof(a);" can output the byte size of an integer, a character, or a float variable, assisting in understanding memory consumption of types .

To find the factorial of a number in C++, a for loop is typically employed to calculate the product of all integers up to that number. For example, "for(i=1;i<=num;i++) { fact=fact*i; }" multiplies a cumulative product 'fact' by each integer 'i' from 1 to 'num', thus computing the factorial .

To determine if a number is prime in C++, a loop iterates from 2 to the number -1, checking divisibility. The logic "for(i=2;i<num;i++) if(num%i==0) { ... }" efficiently breaks if a division has no remainder, thereby identifying the number as non-prime. Conversely, if no divisors are found, the loop concludes, affirming the number's primality. This method leverages efficient looping and condition checks .

The conditional operator in C++ evaluates a condition before a query, returning one of two values based on whether the condition is true or false. For example, using "int a,b; b=a>25 ? 100 : 99;" the variable 'b' will be assigned the value of 100 if 'a' is greater than 25, and 99 if it is not .

The comma operator in C++ is used to evaluate two or more expressions in sequence, returning the value of the last expression. It is particularly useful in scenarios where multiple operations need to be performed, such as initializing or altering multiple variables inside a loop or function. In the expression "(a=c,c=7);" after execution, 'a' would take the value 5 initially set by 'c', while 'c' ends up with 7 .

Unary operators in C++ take a single operand, such as increment (++) and decrement (--) operators, and perform operations like pre-increment, post-increment, pre-decrement, and post-decrement. Binary operators, on the other hand, require two operands and include arithmetic operations like addition, subtraction, multiplication, division, and modulus .

You might also like