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
Among all the scientists of the 1930s, ________ was sosuited to carry out the Manhattan project as J.RobertOppenheimer.
Naily [24]

Answer:

none

Explanation:

Great question, it is always good to ask away and get rid of any doubts that you may be having.

The above phrase does not have any correct entry. The correct way of stating the sentence would be the following.

"Among all the scientists of the 1930's, <u>none were as</u> suited to carry out the Manhattan Project as J. Robert Oppenheimer."

<u></u>

<u>none</u> is an available answer but since the next part of the sentence says <em><u>was so</u></em> it would not make sense or be grammatically correct. Therefore you can either change the available answers or change the next two words in order for the sentence to make sense as well as be grammatically correct.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

4 0
3 years ago
Just trying to pass this class
liq [111]

Answer:

A. Your Foreman

Explanation:

They should be trained on whatever you are doing

4 0
3 years ago
5. What would the browser display if the following code were executed in a script?a var product = 0; while ( product &lt;= 25 );
irga5000 [103]

Answer:

An infinite-loop

Explanation:

This is because the condition is always true ie: product is always less than 25. And once there is no sentinel to stop the loop it will run forever.

7 0
3 years ago
Question #4
jenyasd209 [6]

Answer: new file

Explanation:

3 0
3 years ago
When artists have a successful career, there is sometimes the need to collect all their works in an anthology album. Given main(
elixir [45]

Answer:

Answered below

Explanation:

public class BoxSet extends Album{

private boolean isCompleteWork;

private int numDiscs;

public void setIsCompleteWorks( boolean cw){isCompleteWorks = cw;

}

public boolean getCompleteWorks(){

return isCompleteWorks;

}

public void setNumDiscs(int discs){

numDiscs = discs;

}

public int getNumDiscs(){

return numDiscs;

}

public void printInfo(){

super.printInfo();

System.out.print(isCompleteWorks);

System.out.print(numDiscs);

}

}

3 0
3 years ago
Other questions:
  • When using powershell, an administrator can use the ____________ cmdlet to create a new dc in a new forest.??
    14·1 answer
  • Which of the following indicates what a reply to all function does in most email programs
    8·1 answer
  • What does the term measure refer to in typography
    7·2 answers
  • You create a formula in A8 that adds up the numbers listed in A1 through A7. You copy the formula and paste it into C8. What hap
    9·1 answer
  • In IDLE, which symbols are used for the prompt? <br>*** <br>&lt;&lt;&lt;<br> &gt;&gt;&gt;<br> ---​
    8·1 answer
  • How to jailbreak ios 9.2 ? Is there anyway???!!!!
    12·1 answer
  • Programs are normally stored in ________ and loaded into main memory as needed. the input device the output device secondary sto
    15·1 answer
  • When do I use while loops
    12·1 answer
  • This is just for the points
    15·2 answers
  • Two ways of calculating average returns are ______ and ______. Multiple select question. the arithmetic average the progressive
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!