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
Verdich [7]
2 years ago
7

1.Write a C++ program that allows the user to enter the phrase "I am smart". Output the first letter and last letter of the phra

se using string properties.
2.Write a C++ program to output the following values after they are loaded into an array: 67, 45, 12, 89, 46, 88 and 43.
PLS Help they are different questions
Computers and Technology
1 answer:
rusak2 [61]2 years ago
4 0

Answer:

1)

string value;

cout << "type I am smart";

cin >> value; // get user input from the keyboard

2)

int num1 = 67;

int num2 = 45;

int num3 = 12;

int num4 = 89;

int num5 = 46;

int num6 = 89;

int num7 = 46;

int num8 = 88;

int num9 = 43;

int numbers [ ] = {num1,num2,num3,num4,num5,num7,num8,num9} ;

//to load it as a function

int main ()

{

for ( n=0 ; n<5 ; n++ )

{

result += numbers[n];

}

cout << result;

return 0;

}

You might be interested in
Write a loop that subtracts 1 from each element in lowerScores. If the element was already 0 or negative, assign 0 to the elemen
Verdich [7]

Answer:

Replace <STUDENT CODE> with

for (i = 0; i < SCORES_SIZE; ++i) {

       if(lowerScores.at(i)<=0){

           lowerScores.at(i) = 0;

       }

       else{

           lowerScores.at(i) = lowerScores.at(i) - 1;

       }  

   }

Explanation:

To do this, we simply iterate through the vector.

For each item in the vector, we run a check if it is less than 1 (i.e. 0 or negative).

If yes, the vector item is set to 0

If otherwise, 1 is subtracted from that vector item

This line iterates through the vector

for (i = 0; i < SCORES_SIZE; ++i) {

This checks if vector item is less than 1

       if(lowerScores.at(i)<1){

If yes, the vector item is set to 0

           lowerScores.at(i) = 0;

       }

       else{

If otherwise, 1 is subtracted from the vector item

           lowerScores.at(i) = lowerScores.at(i) - 1;

       }  

   }

Also, include the following at the beginning of the program:

<em>#include <vector></em>

8 0
2 years ago
Su now wants to modify the text box that contains her numbered list. She accesses the Format Shape pane. In what ways can Su mod
Fiesta28 [93]
I believe its E she can insert a picture in the text book
7 0
3 years ago
Read 2 more answers
PLEASE PLEASE HELP. IF THERE A MULTUPLE ANSWERS I WILL BRAINLIEST TO THE BEST ONE!!!!
sladkih [1.3K]

Answer: multiple answers but here is one

Explanation: The Advantages

One of the biggest advantages of ebooks is the fact that they require no trees to create them. This is obviously an eco-friendly option that both reduces cost and lowers environmental impact.

Information can be obtained without leaving your desk! Need to do some last-minute research on a particular topic? Simply find a great ebook store, search for your keywords or phrases, purchase the book and you’re set!

Unlike paper books and materials, digital books only require one device to carry around with you. This means you can carry a library of various book genres for every mood.

eBooks can lower the cost of enjoying your favorite titles. With no shipping and handling costs, eBooks typically have prices that are 50-60% lower than their print counterparts.

eBooks are more flexible than paper books. For those who have trouble reading the typical book-sized font, ebook readers can enlarge the font size to make reading more pleasurable and easier on the eyes.

eBooks can contain multi-media elements not available with traditional books. Audio and video can be embedded to make reading a fully immersive experience.

Ever wonder where that great passage in your favorite book went to? With ebooks you can mark passages, save pages and search text before, during or after you read.

With all these advantages it is difficult to imagine what the disadvantages are, but there are some that have many folks concerned. If you're already sold, we've listed the cheapest prices for the Amazon Kindle below.

The Disadvantages

Piracy is the number one concern for both publishers and authors. While traditional books can be copied with machines, the time and cost of doing so typically keeps this type of piracy at bay. With ebooks, however, 'sharing' books that have not been purchased with others is as easy as posting a file online or, in some cases, copying and pasting the text from one document to another.

Many people still prefer being able to hold a traditional book in their hands. For those of us who enjoy reading a book in bed before signing off for the night, a cold hard digital device just won’t be the same.

While one advantage of ebook devices is their ability to enlarge fonts for easier reading, the fact is you are still reading off an LCD screen. Some readers have matte e-ink screens, but others give off a glare that can not only make reading inconvenient if the lighting isn’t just right, but may actually cause eye strain and make it more difficult to focus while reading.

With the wide variety of formats and ereader devices on the market, choosing which device is the right one for all situations can be nearly impossible. Though compatible formats have been introduced that should allow most readers to view purchases, many of these still lack proper formatting. Without proper page layouts and spacing reading becomes more of a tedious chore than an enjoyable pastime. With traditional books one simply buys and reads!

When is the last time you had to plug your paper book into the wall outlet? How disappointing would it be to find yourself right in the middle of a steamy romance scene while traveling only to have the batteries in your reading device die, with no way to charge them?

Currently, ebooks have an unreliable life span. Paper books last for decades provided they are well cared for. And besides, what good is a bookshelf if you cannot enjoy the look and smell of all your time-worn books, lovingly thumbed, crimped and read cover to cover, over and over again?

7 0
2 years ago
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
Cindy Vindoolo logged on to her e-mail account to find that she had received 50 e-mails from a company called LifeCo that promis
zmey [24]

Answer:

Option C i.e., spam is the correct answer to the following question.

Explanation:

The following mails are spam because when Cindy opens her mail account then, Cindy finds that she gets 50 emails from the unknown company which promises the weight loss if she will buy pills form that company named "LifeCo.". Cindy gets that these companies are fraud or they cheat so they deleted those messages angrily because those are spam.

5 0
3 years ago
Other questions:
  • Below is a chart representing portions of resumes from 3 applicants. Which best explains the applicants careers?
    11·1 answer
  • Musccanic Inc., a company that manufactures microprocessors, updates the technology used in its microprocessors once every four
    15·1 answer
  • What characteristics need to be exhibited by an organisation to improve its software process?
    7·1 answer
  • What term identifies the physical interface between a computer and its peripherals?
    5·1 answer
  • Blank is a type of drag and drop code to help beginner
    14·1 answer
  • Which of the following cannot be used in MS Office.<br> Joystick<br> Scanner<br> Light Pen<br> Mouse
    6·1 answer
  • C#
    10·1 answer
  • Write about virus in five points.​
    8·1 answer
  • Integrity constraints are enforced by Group of answer choices A. The operating system B. The end user C. The database designer D
    15·1 answer
  • The internet is controlled by ______
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!