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
spin [16.1K]
3 years ago
7

Write a repetition statement that outputs the numbers 45 , 51 , . . . , 165 . That is, all of the multiples of 6 in increasing o

rder, starting at 45 and ending at 165 . #include Using namespace std; Int main( ) { Int i = 45; For ( i = 45; i <=165; i = i + 6) Count << i << endl; System("pause"); }
Computers and Technology
1 answer:
Bingel [31]3 years ago
8 0

Answer:

#include <iostream>

using namespace std;

int main()

{

   int i = 45;

   for ( i = 45; i <=165; i = i + 6)

       cout << i << endl;

}

Explanation:

I corrected your code and highlighted the mistakes. Even though you wrote the correct algorithm, your code did not compile because of the typos you made.

Remember, C++ is a case-sensitive language. That means, "For" is not same as "for".

Generally, variables and keywords are written in lower case. Of course, there are exceptions, such as constant variables are all written in uppercase letter and class names start with an uppercase letter.

You might be interested in
Write a function called show_info that takes a name, a home city, and a home state (a total of 3 arguments) and returns a full s
Delicious77 [7]

Answer:

Below are the function for the above question in java Language---

void show_info(String name,String home,String state)

    {

        System.out.println("Your name is "+name+" and you live in "+ home+" ,"+state +".");

    }

Output:

  • If the user inputs name="Gaus",city="LosAngeles" and state="California" then the output will be "Your name is Gaus and you live in LosAngeless, California."

Explanation:

  • The above function is in java language which takes three argument names, state, and the city.
  • The name will be stored on the name variable of the string type.
  • The state will be stored on the state variable of string type.
  • The city will be stored on the city variable of the string type.
  • Then the Output will be displayed with the help of the print function.
  • '+' is used to merge the string.
5 0
3 years ago
Emerson needs to tell his browser how to display a web page. Which tool will he use?
alina1380 [7]

Answer:

HTML

Explanation:

HTML stands for <em>"Hypertext Markup Language." </em>It allows the creation of electronic documents which use <em>semantics</em> to indicate a particular text. The different HTML elements are being separated by<em> "angle brackets" </em>in order to make up a tag. These tags are not visible, but they make it possible for the browser's page to be interpreted.

8 0
3 years ago
Read 2 more answers
What is the difference between primary storage,secondary storage and offline storage what type of storage can be
FrozenT [24]
The diffnce beteen prima storhnge, secoary stoge and ofne stora
5 0
3 years ago
Read 2 more answers
SUMMING THE TRIPLES OF THE EVEN INTEGERS FROM 2 THROUGH 10) Starting with a list containing 1 through 10, use filter, map and su
hichkok12 [17]

Answer:

numbers=list(range(1,11)) #creating the list

even_numbers=list(filter(lambda x: x%2==0, numbers)) #filtering out the even numbers using filter()

triples=list(map(lambda x:x*3 ,even_numbers)) #calculating the triples of each even number using map

total_triples=sum(triples) #calculatting the sum

numbers=list(range(1,11)) #creating the list

even_numbers=[x for x in numbers if x%2==0] #filtering out the even numbers using list comprehension

triples=[x*3 for x in even_numbers] #calculating the triples of each even number using list comprehension

total_triples=sum(triples) #calculating the sum.

Explanation:

Go to the page where you are going to write the code, name the file as 1.py, and copy and paste the following code;

numbers=list(range(1,11)) #creating the list

even_numbers=list(filter(lambda x: x%2==0, numbers)) #filtering out the even numbers using filter()

triples=list(map(lambda x:x*3 ,even_numbers)) #calculating the triples of each even number using map

total_triples=sum(triples) #calculatting the sum

numbers=list(range(1,11)) #creating the list

even_numbers=[x for x in numbers if x%2==0] #filtering out the even numbers using list comprehension

triples=[x*3 for x in even_numbers] #calculating the triples of each even number using list comprehension

total_triples=sum(triples) #calculating the sum

8 0
3 years ago
Write c++ program to find maximum number for three variables using statement ?​
pantera1 [17]

Answer:

#include<iostream>

using namespace std;

int main(){

int n1, n2, n3;

cout<<"Enter any three numbers: ";

cin>>n1>>n2>>n3;

if(n1>=n2 && n1>=n3){

cout<<n1<<" is the maximum";}

else if(n2>=n1 && n2>=n3){

cout<<n2<<" is the maximum";}

else{

cout<<n3<<" is the maximum";}

return 0;

}

Explanation:

The program is written in C++ and to write this program, I assumed the three variables are integers. You can change from integer to double or float, if you wish.

This line declares n1, n2 and n3 as integers

int n1, n2, n3;

This line prompts user for three numbers

cout<<"Enter any three numbers: ";

This line gets user input for the three numbers

cin>>n1>>n2>>n3;

This if condition checks if n1 is the maximum and prints n1 as the maximum, if true

<em>if(n1>=n2 && n1>=n3){</em>

<em>cout<<n1<<" is the maximum";}</em>

This else if condition checks if n2 is the maximum and prints n2 as the maximum, if true

<em>else if(n2>=n1 && n2>=n3){</em>

<em>cout<<n2<<" is the maximum";}</em>

If the above conditions are false, then n3 is the maximum and this condition prints n3 as the maximum

<em>else{</em>

<em>cout<<n3<<" is the maximum";}</em>

return 0;

3 0
3 years ago
Other questions:
  • For window 7 explain the steps you us to find the available program your software will list ?
    8·1 answer
  • A ____ appears at the bottom of your e-mail messages and contains standard information about yourself that the recipient can use
    5·1 answer
  • If you turn on the Lock alpha button , what happens
    5·2 answers
  • You are attempting to upgrade a Windows Server 2008 R2 server to Windows Server 2016 Standard. What must be done in order to acc
    5·1 answer
  • Consider a system consisting of m resources of the same type, being shared by n processes. Resources can be requested and releas
    13·1 answer
  • An F-1 ____________ may be authorized by the DSO to participate in a curricular practical training program that is an__________
    8·1 answer
  • Does anyone know how to fix this???
    11·1 answer
  • What aspect should you consider before adding pictures to a document?
    6·1 answer
  • NEED ANS ASAP THANK YOU
    14·1 answer
  • Which type of GUI control would be best to use if you wanted the user to select one date from a list of three possible dates to
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!