1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Elanso [62]
3 years ago
8

Use the modulo operator (%) to get the desired rightmost digits. Ex: The rightmost 2 digits of 572 is gotten by 572 % 100, which

is 72. Hint: Use / to shift right by the desired amount. Ex: Shifting 572 right by 2 digits is done by 572 / 100, which yields 5. (Recall integer division discards the fraction). For simplicity, assume any part starts with a non-zero digit. So 0119998888 is not allowed.
Computers and Technology
1 answer:
uranmaximum [27]3 years ago
5 0

Hi, you haven't provided the programing language in which you need the code, I'll just explain how to do it using Python, and you can apply a similar method for any programming language.

Answer:

def rightMost(num):

   lenNum = len(str(num))

   rightNum = num%(10**(lenNum-1))

   print(rightNum)

   return(rightNum)

Explanation:

In this function we receive an integer number, then we find how many digits this number has, and finally, we find the rightmost digits; the main operation is modulo (takes the remainder after a division), what we want is to take all the digits except the first one, for that reason we find the modulo of the number when divided by ten to the power of the length of the number minus one, for example, if the number is 2734 we divided by 10^(4-1), where four is the length of the number, this way we get 2734/1000 and the module of it is 734.

You might be interested in
Can my cell phone provider keep track of my internet history?
dem82 [27]
Are they allowed to? No
Could they? Possibly
Hotel? Trivago
8 0
4 years ago
1. You are creating a database for a web hosting service. Which of the following data types
Amiraneli [1.4K]
Well let me see what i can ansewrg x
4 0
3 years ago
Read 2 more answers
How do you send a word document email???
suter [353]

for a word document in an email, you open email and click on the paperclip, then go into your files and find the word document (save it first) then click on that and write the email and send it.
4 0
4 years ago
To support continuous improvement efforts in the workplace, you increase the number of tasks that an employee performs and have
stich3 [128]

Job involvement sounds right

8 0
4 years ago
JAVA
Svetach [21]

public class JavaApplication65 {

   

   public static void main(String[] args) {

       for (int i = 1; i <= 50; i++){

           if (i % 2 == 0){

               System.out.println(i);

           }

       }

   }

   

}

I hope this helps!

6 0
3 years ago
Other questions:
  • 10 points
    12·1 answer
  • Which of the following questions will most likely be answered by displaying data on a line graph?
    14·1 answer
  • A cyberbully is someone who invades another person’s privacy by
    13·2 answers
  • The mutt software is an example of what type of mail service software on Linux? a. Mail Delivery Agent b. Mail Transport Agent c
    5·1 answer
  • Collaborative devices are applications that allow users to work together even when they are in different locations.
    14·2 answers
  • To delete a record, tap or click the record selector for the record, and then press the ____ key(s).
    12·1 answer
  • (multiple choice)Select the items that describe possible problems with being unemployed and not earning income.
    15·2 answers
  • TCP connections are established through sequence numbers. Someone can guess a client's next sequence number and then impersonate
    11·1 answer
  • which two statements about incoming and outgoing interfaces in firewall policies are true? (choose two.)
    10·1 answer
  • Ann, a user, reports that her pc is running slower than usual. which tool would best allow you to identify the bottleneck?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!