0% found this document useful (0 votes)
5 views12 pages

Arithmetic Operator Programming Tasks

The document contains a series of programming questions focused on arithmetic operators, provided by Shambhu Kumar from QSpiders | JSpiders in Noida. It includes tasks such as printing digits of numbers, swapping values, and calculating profit and loss percentages. Each question is designed to test the understanding of basic programming concepts and operations.

Uploaded by

mitchellsamir999
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views12 pages

Arithmetic Operator Programming Tasks

The document contains a series of programming questions focused on arithmetic operators, provided by Shambhu Kumar from QSpiders | JSpiders in Noida. It includes tasks such as printing digits of numbers, swapping values, and calculating profit and loss percentages. Each question is designed to test the understanding of basic programming concepts and operations.

Uploaded by

mitchellsamir999
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

QSpiders|JSpiders|PySpiders, NOIDA

B-4, Block-B, Sector-3, Noida


Arithmetic Operator Programming Questions by
Shambhu Sir
@javac_java Monday, 11 August 2025 @kumarsam07

SHAMBHU KUMAR QSpiders |JSpiders, NOIDA

Q1
Q:1
For a given number int n=5783;
a. Print the last digit of the number
b. Print the last two digit of the number
c. Remove the last digit of the number
d. Remove the last two digit of the number
12/18/2025 Shambhu Kumar QSpiders | JSpiders, 1
NOIDA
SHAMBHU KUMAR QSpiders |JSpiders, NOIDA

Operator based Programming

Q2
For a given three-digit number int n=578;
Print each digit of the number one by one from
Right to Left.
o/p:
8
7
5

12/18/2025 Shambhu Kumar @QSpiders, NOIDA Instagram: @javac_java 2


SHAMBHU KUMAR QSpiders |JSpiders, NOIDA

Operator based Programming

Q3
For a given three-digit number int n=578;
Print each digit of the number one by one from
Left to Right.
o/p:
5
7
8

12/18/2025 Shambhu Kumar @QSpiders, NOIDA Instagram: @javac_java 3


SHAMBHU KUMAR QSpiders |JSpiders, NOIDA

Operator based Programming

Q4
WAJP to swap two numbers.
a. With using a third variable
b. Without using third variable

12/18/2025 Shambhu Kumar @QSpiders, NOIDA Instagram: @javac_java 4


SHAMBHU KUMAR QSpiders |JSpiders, NOIDA

Operator based Programming

Q5
For the given three numbers. Swap 1st into 2nd,
2nd into 3rd and 3rd into 1st number.
a. With using fourth variable
b. Without using fourth variable

12/18/2025 Shambhu Kumar @QSpiders, NOIDA Instagram: @javac_java 5


SHAMBHU KUMAR QSpiders |JSpiders, NOIDA

Operator based Programming

Q6
For the given CP and SP. Calculate %Profit.
CP=120;
SP=160;

12/18/2025 Shambhu Kumar @QSpiders, NOIDA Instagram: @javac_java 6


SHAMBHU KUMAR QSpiders |JSpiders, NOIDA

Operator based Programming

Q7
For the given CP and SP. Calculate %Loss.
CP=120;
SP=90;

12/18/2025 Shambhu Kumar @QSpiders, NOIDA Instagram: @javac_java 7


SHAMBHU KUMAR QSpiders |JSpiders, NOIDA

Operator based Programming

Q8
Find the Last Digit of a Number Without using
% operator.
Int n=12345;
Output:
5

12/18/2025 Shambhu Kumar @QSpiders, NOIDA Instagram: @javac_java 8


SHAMBHU KUMAR QSpiders |JSpiders, NOIDA

Operator based Programming

Q9
Evaluate the Expression:
x = 5 / 2 * 2;
print(x);

12/18/2025 Shambhu Kumar @QSpiders, NOIDA Instagram: @javac_java 9


SHAMBHU KUMAR QSpiders |JSpiders, NOIDA

Operator based Programming

Q10
Evaluate the Expression:
int x = 5 * 9 / 2;
print(x);

12/18/2025 Shambhu Kumar @QSpiders, NOIDA Instagram: @javac_java 10


SHAMBHU KUMAR QSpiders |JSpiders, NOIDA

Operator based Programming

Q11
Evaluate the Expression:
x = 1 + 2 * 3 / 4;
print(x)

12/18/2025 Shambhu Kumar @QSpiders, NOIDA Instagram: @javac_java 11


SHAMBHU KUMAR QSpiders |JSpiders, NOIDA

Operator based Programming

Q12
Evaluate the Expression:
int n = 128;
int x = (n % 10) * 100 + ((n / 10) % 10) * 10 + (n / 100);
print(x)

12/18/2025 Shambhu Kumar @QSpiders, NOIDA Instagram: @javac_java 12

You might also like