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
andrezito [222]
2 years ago
8

Look at the code below. What does it do?

Computers and Technology
1 answer:
yulyashka [42]2 years ago
5 0

Answer:

3- The code takes in an input, turns it into an integer and then multiplies it by 2 and prints it

Explanation:

Look- First, the code snippet asks for an input (int or float) as "Rawheight".

Aftewards, it converts the input into an integer numeral(if it was a float) and multiplies it by 2.

This processed value is, then, further transferred to the variable "double_height" and is thereafter rendered on the user's virtual screen.

You might be interested in
It is not possible to use keywords to search for themes. true or false.
Drupady [299]
False my dude .........................
3 0
3 years ago
8.11 LAB: Count characters - functions Write a program whose input is a character and a string, and whose output indicates the n
Shkiper50 [21]

Answer:

#include<iostream>

using namespace std;

int CountCharacters(char userChar, const string inputstr){

   int k = 0;

   int iter = 0;

   for (iter = 0; iter < inputstr.size(); iter++){

       if (inputstr[iter] ==  userChar){

           ++k;        }}

   return k;}

int main(){

   string str;

   char userChar[1];

   cout<<"Char: ";    cin>>userChar;

   cin.ignore();

   cout<<"String: ";   getline(cin, str);

   cout<<CountCharacters(userChar[0],str);

   return 0;}

Explanation:

Written in C++:

The function is defined here:

int CountCharacters(char userChar, const string inputstr){

This initializes a count variable k to 0

   int k = 0;

This initializes an iterating variable iter to 0

   int iter = 0;

This iterates through the characters of the string being passed to the function

   for (iter = 0; iter < inputstr.size(); iter++){

This checks for matching characters

       if (inputstr[iter] ==  userChar){

If found,  k is incremented by 1

           ++k;        }}

This returns the total count

   return k;}

The main begins here

int main(){

This declares a string variable

   string str;

This declares a character variable

   char userChar[1];

This gets input for the character variable

   cout<<"Char: ";    cin>>userChar;

This lets the user get another input

   cin.ignore();

This gets input for the string variable

   cout<<"String: ";   getline(cin, str);

This calls the function and return the count of character in the string

   cout<<CountCharacters(userChar[0],str);

6 0
3 years ago
Which design element involves the act of lining up objects vertically or horizontally to give a sense of order?
Nadya [2.5K]

Answer:

HHJJTFCS

Explanation:

8 0
3 years ago
How to change a documents theme colors in word?
VladimirAG [237]

Answer:

Change the theme colors in Word

1. Select Design > Colors.

2. Point to a color to preview how it will look in your document.

3. Select a color scheme.

Explanation:

7 0
3 years ago
Google is an example of a(n):
Andre45 [30]
Well i see your X so i would say you were correct it is a search engine.
7 0
3 years ago
Other questions:
  • "what is the #1 resource used when researching a product online?"
    5·1 answer
  • A user is trying to delete a file located on an ntfs volume on his windows 8 computer but is unable to do so. Why is this.
    5·1 answer
  • Haley is helping to choose members for a customer satisfaction team. Which
    6·1 answer
  • What should you do to help prepare yourself for the delivery of your presentation? you can chose more then one
    8·1 answer
  • Listening to music on giggl, join!<br><br> link will be in comments, copy and paste
    9·2 answers
  • Impaired drivers are one of the many risks drivers face on the Highway Transportation System. List 3 signs that a driver could b
    10·2 answers
  • HELP PLSSS I WILL MARK U!!!!
    10·2 answers
  • Please help im not good at computer class ​
    10·2 answers
  • Mrs. Schlair has an annual salary of $96,402.<br> a. What would her semimonthly salary be?
    9·1 answer
  • Why did Elena Gilbert Turn her humanity off when she was sired to Damon? (In The Vampire Diaries)
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!