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
jeka94
2 years ago
5

Write an if/else statement that compares the variable age with 65, adds 1 to the variable seniorCitizens if age is greater than

or equal to 65, and adds 1 to the variable nonSeniors otherwise.
Computers and Technology
1 answer:
Oduvanchick [21]2 years ago
6 0

if age >= 65:

seniorCitizens = seniorCitizens + 1

else:

nonSeniors = nonSeniors + 1

You might be interested in
What is the best way to protect against the loss of important files
Lemur [1.5K]
Back them up on a different drive
4 0
2 years ago
Write a program num2rome.cpp that converts a positive integer into the Roman number system. The Roman number system has digits I
Tom [10]

Answer:

Explanation:

#include <stdio.h>  

int main(void)  

{    

   int num, rem;

   printf("Enter a number: ");

   scanf("%d", &num);

   printf("Roman numerals: ");        

   while(num != 0)

   {

       if (num >= 1000)       // 1000 - m

       {

          printf("m");

          num -= 1000;

       }

       else if (num >= 900)   // 900 -  cm

       {

          printf("cm");

          num -= 900;

       }        

       else if (num >= 500)   // 500 - d

       {            

          printf("d");

          num -= 500;

       }

       else if (num >= 400)   // 400 -  cd

       {

          printf("cd");

          num -= 400;

       }

       else if (num >= 100)   // 100 - c

       {

          printf("c");

          num -= 100;                        

       }

       else if (num >= 90)    // 90 - xc

       {

          printf("xc");

          num -= 90;                                              

       }

       else if (num >= 50)    // 50 - l

       {

          printf("l");

          num -= 50;                                                                      

       }

       else if (num >= 40)    // 40 - xl

       {

          printf("xl");            

          num -= 40;

       }

       else if (num >= 10)    // 10 - x

       {

          printf("x");

          num -= 10;            

       }

       else if (num >= 9)     // 9 - ix

       {

          printf("ix");

          num -= 9;                          

       }

       else if (num >= 5)     // 5 - v

       {

          printf("v");

          num -= 5;                                      

       }

       else if (num >= 4)     // 4 - iv

       {

          printf("iv");

          num -= 4;                                                            

       }

       else if (num >= 1)     // 1 - i

       {

          printf("i");

          num -= 1;                                                                                    

       }

   }

   return 0;

}

8 0
2 years ago
Which logic gate produces an output of 1 only if both it’s inputs are 0?
riadik2000 [5.3K]

Answer:

B, the NOR gate

Explanation:

The truth table of a NOR gate is below.

5 0
3 years ago
Which of the following is an accurate statement? When the LOWER function is used in a SELECT clause, it will automatically store
quester [9]

Answer:

Hi there! The answer is C:

Explanation:

The scope of the LOWER function is limited to the select clause it is being used in. Outside of the select statement, the column will be returned as it is currently present in the database. Using the LOWER function will not automatically store data in lower case letters in the database tables. As an exercise, try creating a simple database table called "Employees" with columns "id" and "name". Then input a row using an insert statement with id as 1 and name as "BLAH". Try using the select statement with LOWER function and then without the LOWER statement.

5 0
2 years ago
Which of the following transferable skills are generally the most looked for in the IT field?
san4es73 [151]
The correct option is D.
Transferable skills refers to those set of skills that do not belong to any specific field or industry, they are general skills and can be transferred from one job to another. Option D is the correct choice because all jobs require the employees to have problem solving skill, team building skills and communication skills; all these skills contribute to a successful career. 
3 0
3 years ago
Read 2 more answers
Other questions:
  • It is better to know the main components of all computer programming languages
    9·1 answer
  • . Reorder the following efficiencies from smallest to largest:
    9·1 answer
  • Select one of the following strategies: active listening, sandwich technique, constructive feedback. in 2-5 paragraphs, define a
    11·1 answer
  • Microcomputers, different from those giant mainframes and supercomputers, are designed for individuals. In fact, the microcomput
    7·1 answer
  • Can anyone please help with this programming code in python num= 7 if num &gt; 3: print(“3”) if num &lt; 5: print(“5”) if num ==
    6·1 answer
  • Write a class named Accumulator containing: An instance variable named sum of type integer. A constructor that accepts an intege
    14·1 answer
  • List the five parts of a system.describe them.
    13·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    13·1 answer
  • How does applying Fontworks effects to text on an advertising flyer change the text?
    14·2 answers
  • El botón de layout se usa para <br>​
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!