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
SashulF [63]
3 years ago
5

You would like the user of a program to enter a customer’s last name. Write a statement thaUse the variables k, d, and s so that

they can read three different values from standard input--an integer, a float, and a string respectively. On one line, print these variables in reverse order with exactly one space in between each. On a second line, print them in the original order with one space in between them.t asks user "Last Name:" and assigns input to a string variable called last_name.

Computers and Technology
1 answer:
mojhsa [17]3 years ago
6 0

Answer:

1st question:

Use the variables k, d, and s so that they can read three different values from standard input an integer, a float, and a string respectively. On one line, print these variables in reverse order with exactly one space in between each. On a second line, print them in the original order with one space in between them.

Solution:

In Python:

k = input()  #prompts user to input value of k i.e. integer value

d = input()  #prompts user to input value of d i.e. float value

s = input()  #prompts user to input value of s i.e. a string

print (s, d, k)  #displays these variable values in reverse order

print (k, d, s)#displays these variable values in original order

In C++:

#include <iostream>    // to use input output functions

using namespace std;   //to identify objects like cin cout

int main() {    //start of main function

  int k;   //declare int type variable to store an integer value

  float d; //  declare float type variable to store a float value

  string s;   //  declare string type variable to store an integer value

  cin >> k >> d >> s;    //reads the value of k, d and s

  cout << s << " " << d << " " << k << endl;     //displays these variables values in reverse order

  cout << k << " " << d << " " << s << endl;   } // displays these variable values in original order

Explanation:

2nd question:

You would like the user of a program to enter a customer’s last name. Write a statement that asks user "Last Name:" and assigns input to a string variable called last_name.

Solution:

In Python:

last_name = input("Last Name:")

# input function is used to accept input from user and assign the input value to last_name variable

In C++:

string last_name;  //declares a string type variable named last_name

cout<<"Last Name: ";  // prompts user to enter last name by displaying this message Last Name:

cin>>last_name; // reads and assigns the input value to string variable last_name

The programs alongwith their outputs are attached.

You might be interested in
Choose all of the items that represent functions of an operating system.
Lynna [10]

Answer:

all 5

Explanation:

operating system is the software thay runs other software

brainly.com/question/18465035

6 0
1 year ago
A standard for compressing music into computer files that can be easily exchanged on the Internet is called a(n) ______. A. musi
Sophie [7]

Answer:

The correct answer is E. MP3

Explanation:

MP3 (formally MPEG-1 Audio Layer III or MPEG-2 Audio Layer III) is a coding format for digital audio. MP3 as a file format commonly designates files containing an elementary stream of MPEG-1 audio and video encoded data, without other complexities of the MP3 standard. The MP3 format makes it possible to compress a song into a file small enough to be uploaded, downloaded, emailed, and stored on a hard drive.

4 0
3 years ago
Which of these can be represented visually by a flowchart?
Mariana [72]

Answer:

i think its C.

if its wrong i'm truly sorry

Explanation:

4 0
3 years ago
Read 2 more answers
What was the effect of the norman conquest on the language of britain?
Maslowich
Option c is answer because most of us are literature in English
6 0
3 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
3 years ago
Read 2 more answers
Other questions:
  • Which category of app does word processing software fall into? A. Productivity B. Entertainment C. Social networking D. Educatio
    14·2 answers
  • In Microsoft Word you can access the _______ command from the "Mini toolbar".
    9·1 answer
  • 2. What's the keyboard command that will allow you to "copy" text?
    8·2 answers
  • Jim has documented a use case that describes the functionality of a system as "To compute gross pay, multiply the hours worked t
    11·1 answer
  • Give your own example of a nested conditional that can be modified to become a single conditional, and show the equivalent singl
    12·1 answer
  • the increase and decrease font button and the change text colour button (as shown in the picture )are include in which group ?​
    6·1 answer
  • The analogy of a computer system is often used to illustrate the different parts of memory. The keyboard is where we encode new
    8·1 answer
  • Anyone know how to fix black screen of death on computer​
    6·1 answer
  • Your team has provisioned an Auto Scaling Groups in a single Region. The Auto Scaling Group at max capacity would total 40 EC2 i
    14·1 answer
  • swer from the options 1. How many basic input devices does a desktop computer have? a)2 b)3 c)1 d)4 2. The computer equipment wh
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!