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 common attack in which a client's cookies, security tokens, or other personal information is obtained and used to impersonate
o-na [289]

Answer:

Identity Theft. i hope this helps :D

5 0
3 years ago
Where are methods listed in a UML class diagram showing three parts?
denis23 [38]

Answer:

the bottom third

Explanation:

Check out the exampe below.

swim() would be an example of a method.

3 0
3 years ago
A python package used in text analysis and natural language processing. True or False
allsm [11]

Answer:

"True" is the correct answer for the above question.

Explanation:

  • There are so many python package which is used in NLP and text analysis.
  • The NLP is a concept in which the system is being interact with the human language and able to understand the human language. This provide the system which is used to intract the computers and humans.
  • The library which is used in NLP are The Conqueror: NLTK, The Prince: TextBlob.
  • The above question also states that there is a library, so it is true statement.
5 0
3 years ago
Pls due soon
Natasha_Volkova [10]

Answer:

Software for personal computers is typically developed and distributed independently from the hardware or operating system manufacturers. Many personal computer users no longer need to write their own programs to make any use of a personal computer, although end-user programming is still feasible. This contrasts with mobile systems, where software is often only available through a manufacturer-supported channel. And end-user program development may be discouraged by lack of support by the manufacturer.

Explanation:

5 0
3 years ago
If you're under 18 and you receive _____ or more license points in 12 months, you'll be restricted to driving only to school or
IRISSAK [1]

Answer:

B:6

Explanation:

FLVS :)

6 0
3 years ago
Other questions:
  • How do you know if you get a phone call that is a scam
    8·2 answers
  • The _______ number system allows digital devices to represent virtually any number simply by using 0s and 1s.
    11·1 answer
  • Information systems security is the collection of activities that protect the information system and the data stored in it.
    12·1 answer
  • Can someone help me to give this guy brainliest the button is not there
    8·1 answer
  • Jenny is the project manager and her company. She needs to break her current project into parts that her employees can work on.
    10·1 answer
  • If my_string = "This is MY string!", why does print (my_string[0:7:5]) return "Ti" and not
    11·1 answer
  • You work for a company that is growing. Originally, all the users in all departments had access to all the data in the database.
    6·2 answers
  • Justin signed a rental agreement for his new condo. How long is his lease? a p e x
    15·1 answer
  • Who like the videos where is clown is from :)
    6·1 answer
  • Raw materials have two basic types what are the 2?
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!