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
vodka [1.7K]
3 years ago
9

Read two numbers on the keyboard. Display for each: how many digits it consists of, which is the sum of the digits, and which of

the two digits is greater.
it is in c++ help me fast pls
Computers and Technology
1 answer:
Fantom [35]3 years ago
6 0

Answer:

Here it is

Explanation:

#include <iostream>

using namespace std;

int main()

{

   int a, b;

   cin >> a >> b;

   int nr_digits1 = 0, nr_digits2 = 0;

   int sum1 = 0, sum2 = 0;

   int max_digit1 = 0, max_digit2 = 0;

   while (a > 1)

   {

       int digit = a % 10;

       nr_digits1 += 1;

       sum1 += digit;

       if (digit > max_digit1)

       {

           max_digit1 = digit;

       }

       a /= 10;

   }

   while (b > 1)

   {

       int digit = b % 10;

       nr_digits2 += 1;

       sum2 += digit;

       if (digit > max_digit2)

       {

           max_digit2 = digit;

       }

       b /= 10;

   }

   

   cout << "For a: \n" << "   No. of digits: " << nr_digits1 << "\n";

   cout << "   Sum of digits: " << sum1 << "\n";

   cout << "   Max digit: " << max_digit1 << "\n";

   cout << "\n";

   cout << "For b: \n" << "   No. of digits: " << nr_digits2 << "\n";

   cout << "   Sum of digits: " << sum2 << "\n";

   cout << "   Max digit: " << max_digit2 << "\n";

   return 0;

}

You might be interested in
A new attack involves hacking into medical records and then offering these records for sale on the black market. A medical recor
Flura [38]

Answer:

1. Control Activities

2. Internal

Explanation:

Considering the scenario explained in the question, it can be concluded that This is an IT application of the COSO principle of CONTROL ACTIVITIES and evidence PREVENTIVE controls.

In this case, the Control Activities which is one of the five principles of COSO (Committee of Sponsoring Organizations of the Treadway Commission) is a means of selecting and developing general control over technology, through strategies and techniques. This is what the medical records company did by building controls into its systems to prevent hackers from accessing its system.

This is an example of internal CONTROL ACTIVITIES that illustrates PREVENTIVE control against potential risks or hacks.

8 0
3 years ago
Which class members should be declared as public?
yawa3891 [41]

Answer:

B. Methods and occasionally final attributes

Explanation:

In Computer programming, class members can be defined as the members of a class that typically represents or indicates the behavior and data contained in a class.

Basically, the members of a class are declared in a class, as well as all classes in its inheritance hierarchy except for destructors and constructors.

In a class, member variables are mainly known as its attributes while its member function are seldomly referred to as its methods or behaviors.

One of the main benefits and importance of using classes is that classes helps to protect and safely guard their member variables and methods by controlling access from other objects.

Therefore, the class members which should be declared as public are methods and occasionally final attributes because a public access modifier can be accessed from anywhere such as within the current or external assembly, as there are no restrictions on its access.

6 0
3 years ago
A(n) ________ software installation enables you to decide which features you want to install on the hard drive. Select one: A. f
Softa [21]

Answer:

D.Custom

Explanation:

When you select  Custom installation, all Compulsory subcomponents and products are installed, but the Optional and Recommended  sub-components and components can be installed selectively on a product-by-product basis for the licenses selected at install time.  It also provides the feature to store it in your desirable disk in the hard drive.

7 0
3 years ago
How to write conclusion of hard disk​
sergeinik [125]

Answer:

el disco duro es un componte de almacenamiento de una pc, su uso es de guardar archivos también como el sistema operativo de ejemplo :linux, window ,mac etc

Explanation:

7 0
3 years ago
Thomas asked his friend for a software suite. His friend had the software suite in his computer and he copied it into a small, r
Misha Larkins [42]

Answer:

The correct answer to the following question will be "Flash memory card".

Explanation:

A flash memory card seems to be a storage (small) medium which stores data or information on fordable or remote devices using non-volatile transistor technology hardware.

  • Most newer offerings include flash storage or memory chips, even though the development of other memory innovations is underway.
  • This would be the storage mechanism from which the configuration tool was replicated by Thomas' friend.
8 0
3 years ago
Other questions:
  • Let's assume that the smallest possible message is 64 bytes (including the 33-byte overhead). if we use 100base-t, how long (in
    10·1 answer
  • Choosing firm goals for your business
    7·2 answers
  • When activated, an Excel object has all the features of an Excel
    8·2 answers
  • Match these items. 1 . Naturalization Act stated that a foreigner had to live in the United States fourteen years to become a ci
    5·1 answer
  • The term "Cloud" refers to what option(s) below? (Select all that apply)
    13·1 answer
  • Select each task that may be completed using a word processor.
    8·2 answers
  • Which of the following does not use a Graphic User Interface?
    14·1 answer
  • 45 points!
    10·2 answers
  • HELP THIS IS SO DIFFICULT
    10·2 answers
  • What type of malware is best known for carrying other malware as a payload?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!