0% found this document useful (0 votes)
2 views1 page

Programming Assignment 3

The document outlines a programming assignment consisting of six tasks involving basic operations with integers, such as counting digits, summing and multiplying digits, calculating remainders, and implementing a loop for subtraction. Each task requires specific input and output formats. The assignment is authored by Shreyan Saha in September 2023.

Uploaded by

Shreyan Saha
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)
2 views1 page

Programming Assignment 3

The document outlines a programming assignment consisting of six tasks involving basic operations with integers, such as counting digits, summing and multiplying digits, calculating remainders, and implementing a loop for subtraction. Each task requires specific input and output formats. The assignment is authored by Shreyan Saha in September 2023.

Uploaded by

Shreyan Saha
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
You are on page 1/ 1

PROGRAMMING ASSIGNMENT - 3

Shreyan Saha
September 2023

1. Accept two positive integers x and y as input and print the number of
digits in xy .

2. Accept a two digit number and print the sum of its digits as output.

3. Accept a three digit integer and print the product of its digits as output.

4. Accept an integer from the user and print the remainder when it is
divided by 3,5 and 7 respectively with each remainder in separate lines.

5. Accept two positive integers M and N.


Case 1: If M ¡ N , print M as the output
Case 2: If M >= N , subtract N from M . Call the difference M1 . If
M1 >= N , then subtract N from M1 and call the difference M2 . Keep
doing this operation until you reach a value k, such that, Mk < N . You
have to print the value of Mk as output.

6. What will be the output of the following code:

You might also like