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
diamong [38]
3 years ago
10

Write a program that takes a string as input from the keyboard, representing a year.

Computers and Technology
1 answer:
Nady [450]3 years ago
7 0
You forgot to mention the language.
You might be interested in
What must you do to enable the members of the rome backup group to perform backup operations on the local system?
steposvetlana [31]
Add Rome Backup group to a membership list of a group that already has access to perform backup operations on the local system. Thank you for posting your question here at brainly. I hope the answer will help you. Feel free to ask more questions here.
5 0
3 years ago
This graph shows both a reflection and a
Tpy6a [65]

Answer:

y=-3x-×-1 I think it's answer is it

6 0
3 years ago
Read 2 more answers
When we type there Is blue like thing blinking what's that called ​
taurus [48]

Answer:

a cursor? I think.

3 0
3 years ago
Read 2 more answers
Does any body know how to bypass easy anti cheat on crossout
dolphi86 [110]

Answer:

It is very hard as easy anticheat is the leading anticheat right now, you can do some web surfing and maybe find out.

6 0
2 years ago
Input 10 integers and display the following:
LekaFEV [45]

Answer:

// code in C++

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{

   // variables

   int sum_even=0,sum_odd=0,eve_count=0,odd_count=0;

   int largest=INT_MIN;

   int smallest=INT_MAX;

   int n;

   cout<<"Enter 10 Integers:";

   // read 10 Integers

   for(int a=0;a<10;a++)

   {

       cin>>n;

       // find largest

       if(n>largest)

       largest=n;

       // find smallest

       if(n<smallest)

       smallest=n;

       // if input is even

       if(n%2==0)

       {  

           // sum of even

           sum_even+=n;

           // even count

           eve_count++;

       }

       else

       {

           // sum of odd    

          sum_odd+=n;

          // odd count

          odd_count++;

       }

   }

   

   // print sum of even

   cout<<"Sum of all even numbers is: "<<sum_even<<endl;

   // print sum of odd

   cout<<"Sum of all odd numbers is: "<<sum_odd<<endl;

   // print largest

   cout<<"largest Integer is: "<<largest<<endl;

   // print smallest

   cout<<"smallest Integer is: "<<smallest<<endl;

   // print even count

   cout<<"count of even number is: "<<eve_count<<endl;

   // print odd cout

   cout<<"count of odd number is: "<<odd_count<<endl;

return 0;

}

Explanation:

Read an integer from user.If the input is greater that largest then update the  largest.If the input is smaller than smallest then update the smallest.Then check  if input is even then add it to sum_even and increment the eve_count.If the input is odd then add it to sum_odd and increment the odd_count.Repeat this for 10 inputs. Then print sum of all even inputs, sum of all odd inputs, largest among all, smallest among all, count of even inputs and count of odd inputs.

Output:

Enter 10 Integers:1 3 4  2 10 11 12 44 5 20                                                                                

Sum of all even numbers is: 92                                                                                            

Sum of all odd numbers is: 20                                                                                              

largest Integer is: 44                                                                                                    

smallest Integer is: 1                                                                                                    

count of even number is: 6                                                                                                

count of odd number is: 4

3 0
3 years ago
Other questions:
  • The practice of texting is most popular and what age group
    12·2 answers
  • The mods have peanuts for brains (it's true, I lost like 1k points to them for no reason)
    12·1 answer
  • Write a program that reads the contents of the two files into two separate lists. The user should be able to enter a boy’s name,
    6·1 answer
  • . The incorrect attitude towards driving is the cause of most collisions among teenage drivers.
    13·2 answers
  • Select the correct answer.
    13·1 answer
  • Anyone understand coding? Please Help! Thank you! :)
    8·1 answer
  • linela Insurance needs to hire twenty accountants immediately to support its accounts receivable process. The hiring and trainin
    10·1 answer
  • Why should you avoid the use of sarcasm, clichés, and idioms in business letters?
    11·2 answers
  • Which of the following is true of binary files?
    6·2 answers
  • You should always be afraid to use the internet<br><br> True or false?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!