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
jeyben [28]
2 years ago
7

In a C++ program, two slash marks ( // ) indicate:

Computers and Technology
1 answer:
Ganezh [65]2 years ago
5 0

Answer:

The option(B) is the correct answer .

Explanation:

In C++  the // (two slash marks ) indicating the beginning of a comment .The two slash marks ( // ) comment the single line in a program.To use two slash marks ( // ) comment we simply write  // in which line we have to make comment.

following are the example of code in c++

#include<iostream.h> // header file

void main() // main method

{

cout<< " india"; // print india

}

here // indicating the beginning of a comment .

You might be interested in
c++ Consider this data sequence: "3 11 5 5 5 2 4 6 6 7 3 -8". Any value that is the same as the immediately preceding value is c
Ksivusya [100]

<u>Answer:</u>

<em>int fNumber,scndNumber = -1,  </em>

<em>dup = 0; </em>

<em>do { </em>

<em>cin >> fNumber; </em>

<em>if ( scndNumber == -1) { </em>

<em>scndNumber = fNumber; </em>

<em>} </em>

<em>else { </em>

<em>if ( scndNumber == fNumber ) </em>

<em>duplicates++; </em>

<em>else </em>

<em>scndNumber = fNumber; </em>

<em>} </em>

<em>} while(fNumber > 0 );  </em>

<em>cout << dup; </em>

<u>Explanation:</u>

Here three variables are declared to hold the first number which is used obtain all the inputs given by the user, second number to hold the value of <em>last encountered number and “dup” variable to count the number of duplicate values.</em>

<em>“Do-while”</em> loop help us to get the input check whether it is same as previous input if yes then it <em>adds to the duplicate</em> value otherwise the new previous value if stored.

4 0
3 years ago
Read 2 more answers
A U.S. social security number consists of a string of 9 digits, such as "444422333". Declare a char array named ssn suitable for
tatuchka [14]

Answer:

Since the question expect us to declare a C-string, the solution code is written in C as follows:

  1.    char ssn[9];
  2.    scanf("%s",ssn);

Explanation:

A C-String is a string written in C language. It is an array of characters. To declare a C-string, we use the keyword, <em>char </em>and then followed with the variable name + brackets and the number of characters in the string. For example, we can create a C-String for the SSN number as in Line 1.

To read standard input into the array, we can use C built-in function, <em>scanf(). </em>Just include a string placeholder, %s, and the variable<em> ssn </em>as arguments to <em>scanf()</em>. This will assign the string input by user to variable <em>ssn</em> as C-String.

8 0
3 years ago
1) what are two functions of a pick or count condition?
viktelen [127]
1.  The best option is C) pick an object at random, and keep track of how many copies of an object are left in a game.
2.   The best option is D) clockwise and counterclockwise.
3.    your 3rd question does not seem to be clear to me.
3 0
3 years ago
Malcolm Movers charges a base rate of $200 per move plus $150 per hour and $2 per mile. Write a program named MoveEstimator that
jeka94

Answer:

import java.util.Scanner;

public class MoveEstimator

{

public static void main(String[] args) {

   

    Scanner input = new Scanner(System.in);

    final int BASE_RATE = 200, RATE_PER_HOUR = 150, RATE_PER_MILE = 2;

    int hours, miles;

    double totalFee = 0.0;

   

 System.out.print("Enter the number of hours for a job: ");

 hours = input.nextInt();

 System.out.print("Enter the number of miles: ");

 miles = input.nextInt();

 

 totalFee = BASE_RATE + (hours * RATE_PER_HOUR) + (miles * RATE_PER_MILE);

 System.out.printf("For a move taking %d hours and going %d miles the estimate is $%.2f", hours, miles, totalFee);

}

}

Explanation:

*The code is in Java.

Create the Scanner object to be able to get input

Initialize the constant values using final keyword, BASE_RATE, RATE_PER_HOUR, RATE_PER_MILE

Declare the variables, hours, miles, totalFee

Ask the user to enter the hours and miles

Calculate the totalFee, add BASE_RATE, multiplication of  hours and RATE_PER_HOUR, multiplication of  miles and RATE_PER_MILE

Print the output as in required format

6 0
2 years ago
Well this isn't school related, but how do i watch dubbed and subbed anime for free on my computer?
Shtirlitz [24]
Crunchyroll or my anime list. Both of these work.

Hope this helps you

3 0
3 years ago
Read 2 more answers
Other questions:
  • What does software alone enable a computer to do? connect to the Internet control processing speeds interact with the user manag
    11·2 answers
  • A work-study student receives a paycheck from:
    15·2 answers
  • 1. Extract title Write a function extract_title that takes one parameter, the filename of a GenBank formatted file, and returns
    14·1 answer
  • What is the use of "Computer" Icon ?
    15·2 answers
  • Modify the program you wrote for Chapter 6 Exercise 6 so it handles the following
    15·1 answer
  • 1. You are given a database to create, however, you realize that in the instructions you are told to create relationships betwee
    5·1 answer
  • Tiền tệ ra đời là kết quả
    7·2 answers
  • How was data put into the Tabulating Machine?
    7·1 answer
  • What is the value of x after running this code?
    13·2 answers
  • ....................................................................................................
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!