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
Murrr4er [49]
1 year ago
12

Write a program that asks the user to enter a city name, and then prints Oh! CITY is a cool spot. Your program should repeat the

se steps until the user inputs Nope.
Sample Run
Please enter a city name: (Nope to end) San Antonio
Oh! San Antonio is a cool spot.
Please enter a city name: (Nope to end) Los Angeles
Oh! Los Angeles is a cool spot.
Please enter a city name: (Nope to end) Portland
Oh! Portland is a cool spot.
Please enter a city name: (Nope to end) Miami
Oh! Miami is a cool spot.
Please enter a city name: (Nope to end) Nope
Computers and Technology
1 answer:
Zinaida [17]1 year ago
6 0

A program is a noun that refers to a collection of instructions that process input, manipulate data, and produce a result. It is also referred to as an application or software.As an illustration, the word processing tool Microsoft Word enables users to generate and write documents.

<h3>What is write a program in a computer?</h3>

enter user name

If you want to stop the software, type Nope or input a name.

if user name!= "Nope," then

"Nice to meet you," user name, print

enter user name

If you want to stop the software, type Nope or input a name.

The user name variable contains the name that is obtained from the user as an input.Till user name does not match the value of Nope, continue the while loop.Display the user's name and keep asking the same question inside the while loop until the user responds with Nope.

To learn more about program refer

brainly.com/question/15637611

#SPJ1

You might be interested in
Declare k, d, and s so that they can store an integer, a real number, and a small word (under 10 characters). Use these variable
Svetradugi [14.3K]

Answer:

int k;

double d;

char s[10];

cin >> k >> d >> s;

cout << s << " " << d << " " << k << "\n" << k << " " << d << " " << s;

Explanation

First Step (declare K, d, s) so they can store a integer

int k;

double d;

char s[10];

Second Step (read in an integer, a real number and a small word)

cin >> k >> d >> s;

Third Step ( print them out )

cout << s << " " << d << " " << k << "\n" << k << " " << d << " " << s;

5 0
3 years ago
1.2.2: Output variable value. Jump to level 1 Write a statement that outputs variable userAge. End with a newline. 1 2 3 4 5 6 7
serg [7]

Answer:

cout<<"User Age is ="<<userAge<<endl;

Explanation:

#include<iostream>

using namespace std;

int main()

{

int userAge;

cin >> userAge; // Program will be tested with values: 15, 40.

cout<<"User Age is ="<<userAge<<endl;

return 0;

}

5 0
4 years ago
Create an ArrayList of strings to store the names of celebrities and athletes. Add 5 names to the list. Process the list with a
mr Goodwill [35]

Answer:

// ArrayList class is imported

import java.util.ArrayList;

// Iterator class is imported

import java.util.Iterator;

// Main class is defined

class Main {

   // main method to begin program execution

   public static void main(String args[]) {

       // names ArrayList of String is defined

       ArrayList<String> names = new ArrayList<>();

       // 5 names are added to the list

       names.add("John");

       names.add("Jonny");

       names.add("James");

       names.add("Joe");

       names.add("Jolly");

       // for loop to print the names inside the arraylist

       for(int index = 0; index <names.size(); index++){

         System.out.println(names.get(index));

       }

       

       // A blank line is printed

       System.out.println();

       // A newMethod is called with names as argument

       newMethod(names);

       // A blank line is printed

       System.out.println();

       // Instance of Iterator class is created on names

       Iterator<String> iter

           = names.iterator();

 

       // Displaying the names after iterating

       // through the list

       while (iter.hasNext()) {

           System.out.println(iter.next());

       }

   }

   // the newmethod is created here

   public static void newMethod(ArrayList<String> inputArray){

     // A new name is added at index 2

     inputArray.add(2, "Smith");

     // the name in index 4 is removed

     inputArray.remove(4);

     // for each is used to loop the list and print

     for (String name : inputArray) {

       System.out.println(name);

       }

   }

}

Explanation:

The code is well commented. An output image is attached.

7 0
4 years ago
List two ways that search engines and electronic databases are similar and three ways that search engines and electronic databas
antoniya [11.8K]

Answer:

Explanation: search engine uses system algorithm to search out items or information as required by the user. Example is google, chrome.

Data base are archives where information could be retrieve. Its contain information such as publications, abstract,journals.

Search engine provides wide range of information depending on you request while database are mostly for academics related materials.

Data base- A good place to generate this information is library, archivals while journal, publiications are kept while search engine can be used anywhere you have an internet facilities.

In a data base, information is searched in an organized way. The collections are already well arranged in different cubicle search engine provides wide range of information not organized.

Data base may contain more complex information not easily understood, search engine provides more elaborate answers.

Similarity of the two is that they both provide information.

They are both reliable.

School library is an example of where journals and publication are kept and can be retrived.

6 0
4 years ago
Read 2 more answers
Samantha wants to begin searching for a job using the Web. The best source for her online search will probably be __________.
zalisa [80]

Answer:

C) A company's website

Explanation:

8 0
2 years ago
Other questions:
  • Information Can Be Gathered Regarding The Temperature Of A Substance And Uploaded To A Computer Using A ___________ As A Data Co
    6·1 answer
  • In ethical hacking testing, what approaches exist for the ethical hacker to choose from depending on how much information is kno
    10·2 answers
  • How to find no of Distinct triangles in a polygon?
    10·1 answer
  • Which organization has published more than 300 web standards
    7·1 answer
  • While performing Before Operations PMCS, you notice the front right tire appears slightly underinflated. What is the proper acti
    11·1 answer
  • Ted is looking for a reliable source for his paper. Which of the following sites would be considered reliable?
    5·1 answer
  • How are people using lying today? What are the types of lying? Describe each type.
    7·1 answer
  • Java uses a right brace to mark the end of all compound statements. What are the arguments for and against this design?
    8·1 answer
  • How many characters should a strong password have? four six eight ten
    10·2 answers
  • Question 11
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!