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
77julia77 [94]
3 years ago
10

3.29 LAB: Login name Write a program that creates a login name for a user, given the user's first name, last name, and a four-di

git integer as input. Output the login name, which is made up of the first five letters of the last name, followed by the first letter of the first name, and then the last two digits of the number (use the % operator). If the last name has less than five letters, then use all letters of the last name. Ex: If the input is: Michael Jordan 1991 the output is: Your login name: JordaM91 Ex: If the input is: Kanye West 2024 the output is: Your login name: WestK24
Computers and Technology
1 answer:
romanna [79]3 years ago
4 0

Answer:

In C++:

#include <iostream>

using namespace std;

int main(){

   string fname,lname; int num;

   cout<<"Firstname: "; cin>>fname;

   cout<<"Lastname: "; cin>>lname;

   cout<<"4 digits: "; cin>>num;

   string login = lname;

   if(lname.length()>=5){

       login = lname.substr(0, 5);    }

   login+=fname.substr(0,1)+to_string(num%100);

   cout<<login;

   return 0;

}

Explanation:

See attachment for explanation where I used comments to explain each line

Download cpp
You might be interested in
A draft has the following:<br> Plot<br> Details<br> Transition Words<br> Important events in order
exis [7]
What do you have to do?
7 0
3 years ago
Which statement best describes the types of products and services that are suitable for online sale?
garri49 [273]

A statement which best describes the types of products and services that are suitable for online sale is: D. Not all products or services are well-suited for sale on the Internet.

<h3>What is e-commerce?</h3>

E-commerce is also referred to as an online sale and it can be defined as a business model which is designed and developed to involve the buying and selling of goods (products) over the Internet.

Basically, e-commerce technologies are designed and developed to comprises software and information technology (IT) systems which typically support safe and secure transactions over network and the Internet, so as to make e-commerce possible.

<h3>What is a product?</h3>

A product can be defined as any physical object (tangible item) that is typically produced by a manufacturer so as to satisfy and meet the demands, needs or wants of every customer. Some examples of a product include the following:

  • Mobile phones
  • Television
  • Microwave oven
  • Laptop

In conclusion, we can infer and logically deduce that it is not all products or services that are well-suited for sale on the Internet through e-commerce.

Read more on e-commerce here: brainly.com/question/23369154

#SPJ1

4 0
2 years ago
When did the first usb flash drive appear on the retail market? Which company developed this storage medium?
jeka57 [31]

The first commercially-available USB flash drive was the "ThumbDrive," produced by Singapore company Trek Technology in 2000. The drive had capacities of

8 MB

64 MB

1.44 MB

256 MB

7 0
3 years ago
The % symbol is the remainder operator, also known as the ________ operator.
faust18 [17]

Answer:

It's also called the modulo operator.

6 0
3 years ago
Read 2 more answers
List 2 negative impacts of cybersecurity.<br><br><br><br>Answer and I will give you brainiliest ​
Nitella [24]

Answer:

Cyber security can be used for good but nevertheless some people will find ways to do bad things. Basically the negative impacts of cyber security is the opposite to the good type of cyber security they take advantage of it and exploit computer system to do what they want. An example to this is planting a malware on the victim's computer or using a DDOS attack on a WiFi router the possibility are endless.

5 0
3 years ago
Other questions:
  • Which program or security application prevents access between a private and trusted network, and other untrusted networks?
    8·2 answers
  • The ________ of the operating system enables users to communicate with the computer system. Select one: A. user interface B. mod
    15·1 answer
  • Which of the following software program provides for email communication
    13·2 answers
  • A third-grade teacher at Potter Elementary School wants a program that allows a student to enter the amount of money a customer
    14·1 answer
  • A table is a useful way to present information that is organized into categories, or fields.
    15·1 answer
  • Explain the purpose of QoS on a TCP/IP network. Define the basic purpose of IP prece- dence, Type of Service, Diffserv, and Expl
    11·1 answer
  • A _____ is a type of legal protection for which person can apply to protect an invention or a discovery.
    9·1 answer
  • Random Walker Collisions In lecture, we saw how to model the behavior of a random walker on a 2D grid using a Monte Carlo simula
    8·1 answer
  • calculate how many turns of cable you will need on the drum for your cage and skip to move up and down by 500 m​
    12·1 answer
  • Computers rarely make mistakes. True or false
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!