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
What’s your fave tv show?
kompoz [17]

Answer:

the vampire diareas

Explanation:

7 0
3 years ago
Read 2 more answers
The term _____ best describes the level of technology skills needed in today’s business world.
laiz [17]
The answer is fluency.
4 0
3 years ago
What was the first 1.0.1 version of openssl that was not vulnerable to heartbleed?
vovikov84 [41]
I suggest you to read OpenSSL changelogs to make it more clear. As there's not enough space to describe how it works. But heartbleed resistan version was 1.0.2, as I know.
5 0
3 years ago
Read 2 more answers
A string is represented as an array of characters. If you need to store an array of 5 strings with the maximum length of a strin
erastova [34]

Answer:

char str[5][100]

Explanation:

See attachment for options:

From the options, we can see that the programming language is C language.

The syntax to store an array of m strings with a maximum of n elements in C is:

char array-name[m][n]

In this case:

m = 5 --- Number of strings in the array

n = 100 --- Maximum character in each string

Assume the array name is str, the syntax can be expressed as:

char str[5][100]

3 0
3 years ago
Thinking about the career cluster, "Information Technology", which of these careers would typically NOT be included? (Choose thr
Dvinal [7]
I am guessing, my guess would be scientific research, managing entertainment, and video game designer
3 0
3 years ago
Read 2 more answers
Other questions:
  • What is an extrinsic value? A. something that is valuable in and of itself B. something that is valuable because it leads to ano
    12·1 answer
  • Renee's creating a plan for her business's information system. What should she do after she determines the goals for her busines
    10·1 answer
  • Defeating authentication follows the method–opportunity–motive paradigm.
    5·1 answer
  • Where Can you find 2tickets Universal Studios Horror night
    10·2 answers
  • Implement a recursive method named power that takes 2 integer parameters named base and expo. The method will return the base ra
    6·1 answer
  • Determine if the following statement is true or false:
    5·2 answers
  • How does the internet help you to improve your:
    15·2 answers
  • The most important preinstalled software is the ______ software that allows you to use the computer the first time you turn it o
    7·1 answer
  • One way to check if a website is secure is to look for a/an<br> in the address bar.
    10·1 answer
  • Every windows service has the 3 start types what are those service types?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!