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
Charra [1.4K]
3 years ago
8

Given an integer variable drivingAge that has already been declared, write a statement that assigns the value 17 to drivingAge .

Computers and Technology
1 answer:
lozanna [386]3 years ago
4 0

Answer:

The code to this question as follows:

Code:

#include <stdio.h> //include header file for using basic function

int main() //defining main method

{

int drivingAge = 17; //defining integer variable that assign a value

printf("%d\n",drivingAge);//print value.

return 0;  

}

Output:

17

Explanation:

In the above C language code, firstly a header file is included this file is used for use basic function. In the next line, the main function is defined, inside the main method, an integer variable "drivingAge" is declared that holds a value that 17 and to print variable value the printf function is used that prints its value.

You might be interested in
The program DebugTwo2.cs has syntax and/or logical errors. Determine the problem(s) and fix the program.// This program greets t
Elenna [48]

Answer:

The corrected code is as follows:

using System;

using static System.Console;

class DebugTwo2{

     static void Main(string[] args){

       string name;string firstString, secondString;

       int first, second, product;

       Write("Enter your name >> ");

       name = ReadLine();

       Write("Hello, {0}! Enter an integer >> ", name);

       firstString = ReadLine();

       first = Convert.ToInt32(firstString);

       Write("Enter another integer >> ");

       secondString = ReadLine();

       second = Convert.ToInt32(secondString);

       product = first * second;

       Write("Thank you, {0}. The product of {1} and {2} is {3}", name,first, second, product);

   }

}

Explanation:

       string name;string firstString, secondString; ----- Replace secondSting with secondString,

<em>        int first, second, product;</em>

       Write("Enter your name >> "); --- Here, the quotes must be closed with corresponding quotes "

       name = ReadLine(); The syntax of readLine is incorrect without the () brackets

<em>        Write("Hello, {0}! Enter an integer >> ", name);</em>

<em>        firstString = ReadLine();</em>

       first = Convert.ToInt32(firstString); There is a dot between Convert and ToInt32

<em>        Write("Enter another integer >> ");</em>

       secondString = ReadLine(); --- Readline() should be written as ReadLine()

<em>        second = Convert.ToInt32(secondString);</em>

<em>        product = first * second;</em>

       Write("Thank you, {0}. The product of {1} and {2} is {3}", name,first, second, product); --- The formats in {} should start from 0 because 0 has already been initialized for variable name

   }

}

5 0
3 years ago
Assume that speed = 10 and miles = 5. What is the value of each of the
Assoli18 [71]

a. speed + 12 - miles * 2  = 10 + 12 - 5 * 2. With order of operations, we do the multiplication first so the equation is now 10 + 12 - 10 = 22 - 10 = 12

b. speed + miles * 3  = 10 + 5 * 3 and again, order of operations gives us 10 + 15 = 25

c. (speed + miles) * 3  = (10 + 5) * 3 = 15 * 3 = 45

d. speed + speed * miles + miles  = 10 + 10 * 5 + 5 = 10 + 50 + 5 = 60 + 5 = 65

e. (10 – speed) + miles / miles = (10 - 10) + 5 / 5 = 0 + 5 / 5 = 5 / 5 = 1

5 0
4 years ago
Quiz
Dmitrij [34]

Answer: False

Explanation: It is sent to committee then senate.

4 0
3 years ago
Which one of the following functional business systems supports the finance business function?
bogdanovich [222]
It seems that you have missed the given choices for this question, but anyway, here is the correct answer. The functional business systems that supports the finance business function are CASH MANAGEMENT and FINANCIAL FORECASTING. Hope this is the answer that you are looking for. 
5 0
4 years ago
How do you add a section break that would start the new section on the same page?
Maksim231197 [3]
Leave a line and that will make a section break
8 0
4 years ago
Read 2 more answers
Other questions:
  • The collodion process was significantly more expensive than the cost of a daguerreotype
    10·1 answer
  • Which of the following is NOT a recommended characteristic for incident objectives?A. Stated in broad terms to allow for flexibi
    6·1 answer
  • Which tables and fields would you access to determine which book titles have been purchased by a customer and when the order shi
    15·1 answer
  • when you assign a(n) ___ to a field, Access will display the value you assign, rather than the field name, in datasheets and in
    15·1 answer
  • Which of the following skills do employers in any field expect their employees<br> to have?
    5·1 answer
  • What is it called when an attacker convinces you to enter personal information at an imposter website after receiving an email f
    10·2 answers
  • You are network administrator for an Active Directory forest with a single domain. Then network has three sites with one domain
    12·1 answer
  • Why is it necessary to have a w-2 or 1099 form when using tax preparation software?
    13·1 answer
  • Define a SCHEME function, unzip, which takes a list of pairs ((a .b)... (an .bn)) and returns a pair consisting of the two lists
    7·1 answer
  • What process sends ones and zeroes across network cables
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!