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
Alex_Xolod [135]
4 years ago
13

Make a program (C++). Sum of a 4 digits number and eliminating last digitsȘ

Computers and Technology
1 answer:
igomit [66]4 years ago
5 0

Answer:

#include <iostream>

#include <string>  

int GetEliminationSum(int number)

{

int sum = 0;

std::string s = std::to_string(number);

while (s.length() > 1)

{

 s = s.substr(1);

 sum += std::stoi(s);  

}

return sum;

}

int main()

{

   std::cout << "Enter your 4-digit number: ";

int number;

std::cin >> number;

std::cout << "The elimination sum is " << GetEliminationSum(number);

}

Explanation:

You might be interested in
An ip address that does not change and is usuallly assigned manually is called what?
Sav [38]
A static IP.

------------------------
4 0
3 years ago
What is the purpose of the backoff on Ethernet networks?
stellarik [79]

Answer: Please see below as the answer is self-explanatory.

Explanation:

In the original Ethernet standard, IEEE 802.3, the method used to deliver packets within a Ethernet network, is called CSMA/CD, and the acronym includes all the Ethernet features in brief.

Let's explain the different parts of the acronym.

CSMA= Carrier Sense Multiple Access.

This means that when any computer in the network (with no privileges for nobody) has a packet to transmit, it first "listen"if the network is idle. If it is the found condition, deliver the packet, and wait for an acknowledgement.

If past a given time, the ACK is not received, assumes that the packet was lost, due to a collision with another packet coming from another computer (this can happen because the packets don't travel instantaneously from one host to another, so one machine could have started to transmit before the another one could sense this fact).

This process is described by the other part of the acronym:

CD = Collission Detection

In order to avoid this type of problem, before trying to resend the packet, it waits some time, which is called "backoff".

This time increases exponentially each time that it is not possible to send a packet successfully, in order to try to find a moment in which finally the network be clear.

8 0
4 years ago
To analyze data from a survey, you use a spreadsheet to calculate the percent of students who prefer corn over broccoli or carro
alisha [4.7K]

<u>Answer</u>:

<em>By changing the decimal to a percentage </em>

<u>Explanation:</u>

Since the requirement is to calculate the percentage of students about their preference in eating vegetables, we need to convert the given values to percentage only.  

<em> Option A: </em>By changing the addition sign to a multiplication sign. This is invalid because, there is no addition and multiplication involved in converting to percentage

<em>Option C:</em> By changing the percentage to a decimal. The given data is not available in percentage so conversion is impossible.

<em>Option D:</em> By changing the multiplication sign to a division sign Multiplication and division are not going to be performed here, since we need only percentage.

4 0
3 years ago
Read 2 more answers
Rikki has had several problems at work recently. Her printer isn't printing correctly, copies from the copy machine come out wit
Ghella [55]
Create a maintenance schedule 
3 0
3 years ago
Read 2 more answers
BRAINLIEST
Naddik [55]

Answer:

E.  \: blog

8 0
3 years ago
Read 2 more answers
Other questions:
  • Why is a port scan detected from the same ip on a subnet an alarming alert to receive from yourids?
    5·1 answer
  • Which group on the Home Ribbon contains the line spacing attribute?
    9·2 answers
  • A derived character that is shared by all members of a clade is called a ______________ of that clade.
    6·1 answer
  • A user found that their personal data had been exfiltrated from their computer by a malicious program that they clicked on sever
    12·1 answer
  • What are the examples of shareware?
    9·2 answers
  • Which of the following types of networks encrypts data for transmitting over
    15·1 answer
  • How does social media help?<br><br>i will give you the brainliest​
    13·2 answers
  • Does anyone know how to write this right? This is for a coding class and I’m super confused on it.
    13·1 answer
  • A(n) _____ is a computerized system by which subscribers are able to communicate to all other subscribers by sending a transmiss
    5·1 answer
  • Connection security rules are used to secure traffic between two computers while it crosses internet?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!