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
lions [1.4K]
3 years ago
11

Each cout statement has a syntax error. Type the first cout statement, and press Run to observe the error message. Fix the error

, and run again. Repeat for the second, then third, cout statement. cout << "Num: " << songnum << endl; cout << int songNum << endl; cout << songNum " songs" << endl;
Computers and Technology
1 answer:
Vitek1552 [10]3 years ago
6 0

Answer:

cout << "Num: " << songNum << endl;

cout << songNum << endl;

cout << songNum << " songs" << endl;

Explanation:

Since you did not provide the whole code and each statement has an error, it seems the name of the variable is songNum. Depending on these, you can see the corrections below:

cout << "Num: " << <u>songnum</u> << endl;   → cout << "Num: " << songNum << endl;

The name of the variable must be written correctly.

- - -

cout << <u>int</u> songNum << endl;  →  cout << songNum << endl;

Declaration of the variable must be done before printing it.

- - -

cout << <u>songNum " songs" </u><< endl;  →  cout << songNum  << "songs" << endl;

There must be "<<" signs between each part while printing.

You might be interested in
50 points for each person brainless goes to the best answer
wolverine [178]

Technical writing is writing that is done for the purpose of educating, informing or directing someone on how to do something. Technical writing is significantly different than other types of writing such as narrative, because technical writing is intended to impart to the reader some specific skill or ability. Technical writing isn't for everyone. It is often very detail-oriented and usually involves writing within fields where some advanced knowledge is required. When given a technical writing assignment, it also must be approached in a certain way in order for you to be successful. but i would have to go with c- e commerce

6 0
3 years ago
Read 2 more answers
Write an application that reads the lengths of the sides of a triangle from the user. compute the area of the triangle using her
zlopas [31]

Here you go,


import java.util.Scanner;

import java.util.Random;

public class OrderCalculator{


public static void main(String[] args){  


float x, y, z, semi, area;

Scanner in = new Scanner(System.in);

System.out.print("Enter the 3 sides: ");

x = in.nextFloat();

y = in.nextFloat();

z = in.nextFloat();

semi = (float) ((x + y + z) / 2.0);

area = (float) Math.sqrt(semi * (semi - x) * (semi - y) * (semi - z));

System.out.printf("The area is: %.3f\n", area);


}

}

3 0
3 years ago
What are the steps to add a bibliography to a document? 1. Create a using the proper steps. 2. Go to the tab on the ribbon. 3. I
olasank [31]

Answer:

The steps required to add a bibliography after adding the sources of the information contained in the document and marking the references made in the text, are;

1. Click to select insertion point of the bibliography

2. Select the Reference tab by clicking on the Reference tab in the ribbon

3. Within the Citations & Bibliography group, select Bibliography to open  a dropdown list of bibliography format

4. Select the applicable format

5. By selecting the desired bibliography format, the bibliography is inserted at the selected insertion point of the document

Explanation:

6 0
3 years ago
Create a Boolean function odd_number_digits(n) that returns True when a positive integer has an odd number of digits. (You may a
Snowcat [4.5K]

Answer:

Following are the code to this question:

import java.util.*;//import package for user input

public class Main//defining class main

{

   public static boolean odd_number_digits(int n)//defining boolean method odd_number_digits

   {

       if(n>0 && n%2!=0)//defining if block that check value is positive and odd number

       {

       return true;//return value true

       }

       else//defining else block

       {

           return false;//return false value

       }

   }

   public static void  sum_odd_digits(int n)//defining a method sum_odd_digits

   {

       int sum=0,i;//defining integer variable

       for(i=0;i<=n;i++)//defining for loop

       {

           if(i%2!=0)//defining if block for odd number

           {

               sum=sum+i;//add odd number

           }

       }

      System.out.print(sum);//use print method to print sum value

   }

public static void main(String[] args) //defining main method

   {

       Scanner ox=new Scanner(System.in);//creating Scanner object

       int n= ox.nextInt();//defining integer variable for input value

       System.out.print(odd_number_digits(n)+ "\n");//use print method to call method

       System.out.println("Sum of odd numbers: ");//print message

       sum_odd_digits(n);//calling method

   }

}

Output:

please find the attachment.

Explanation:

In the above code, two methods "odd_number_digits and sum_odd_digits" are defined in which the first method return type is boolean because it will true or false value, and the second method returns the sum of odd numbers.

In the "odd_number_digits" method,  an integer variable passes as an argument and inside the method, if block is used that check value is a positive and odd number then it will return a true value.

In the "sum_odd_digits" method, it accepts an integer parameter "n", and define integer variable "sum" inside the method, which uses the for loop, inside the loop if block is used that counts odd numbers and adds its in sum and print its value.

8 0
3 years ago
Because it manages all other software the computer which software is most important
Wewaii [24]

Answer: second option: Operating system...

An operating system is the most important software that runs on a computer. It manages the computer's memory and processes, as well as all of its software and hardware. It also allows you to communicate with the computer without knowing how to speak the computer's language.

Hope this helps... Stay safe and have a Merry Christmas!!!!!!! :D

6 0
3 years ago
Read 2 more answers
Other questions:
  • What kind of video are you are able to watch by downloading it from the Internet?
    10·1 answer
  • For what type of document would you use the landscape page orientation
    11·1 answer
  • Which one of the following rules for selecting a password is the best?
    5·2 answers
  • To print a mailing label, click the Labels button on the MAILINGS tab in the ____ group. A. Building Block B. AutoText C. Templa
    10·2 answers
  • What happens if the user sysadmin invokes the mail command interface and there are no unread mail messages?
    13·1 answer
  • Describe 2 health risks posed by computers
    8·1 answer
  • What is the BCC feature used for?
    12·2 answers
  • Java can be procedural or object-oriented when it comes to programming. What is the difference between procedural and OOP?​
    13·1 answer
  • An animation of a person standing with their arms extended out to their sides. There are 3 dimensional boxes around the torso of
    5·1 answer
  • Which of these is a neologism created as a result of the information age?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!