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
Calculate the performance of a processor taking into account stalls due to data cache and instruction cache misses. The data cac
zhuklara [117]

Answer:

- Calculate the additional CPI due to the icache stalls.

- Calculate the additional CPI due to the dcache stalls.  

- Calculate the overall CPI for the machine.

The additional CPI due to icache stalls = Hit Rate * Hit Latency + Miss Rate*  

Miss Penalty = 0.9*2 + 0.1*50 = 1.8 + 5 = 6.8  

The additional CPI due to dcache stalls = 0.92*2 + 0.08*124 = 11.76  

The overall CPI = 0.3*11.76 + 0.7*1.0 + 1.0*6.8 = 11.03 7.  

Explanation:

6 0
3 years ago
Which payment method typically charges the highest interest rates
mixer [17]
Credit cards do charge the most interest
5 0
3 years ago
A(n) _____ bus enables the central processing unit (CPU) to communicate with a system’s primary storage.
Jobisdone [24]
An Address bus enables the cpu to communicate with a system's primary storage.
4 0
3 years ago
_______________ are distinguished from microcontrollers by their complexity and increased on-chip resources.A. Systems on a chip
weeeeeb [17]

Answer:

the correct option is (A)

Explanation:

According to the given scenario, the system on a chip is a chip that is different from the microcontrollers in terms of complexity and rise on the chip resources

The system on a chip is a circuit i.e. integrated most the computer things

hence, the correct option is (A).

Therefore the rest of the options are wrong

6 0
3 years ago
Read 2 more answers
A smartphone user notices that their phone gets very hot, and their battery is draining quickly. Even when the phone is in their
nika2105 [10]

Answer:

The problem would be the battery

Explanation:

The reason is becuse the battery might be bad or have a shortage in it hope this helps :) and good luck!

6 0
2 years ago
Other questions:
  • 1. Create a detail report that will display all SCR courses in alphabetical order, with the course name and the instructor name
    6·1 answer
  • How to interchange first half of the array with second half of array in python?
    9·1 answer
  • You work for a company that builds custom PCs for select clients. You are training a new employee to evaluate and select appropr
    13·1 answer
  • Which programming element is used by a game program to track and display score information
    12·2 answers
  • Word processing software, spreadsheet software, database software, and presentation software are examples of what category of co
    13·1 answer
  • Decision support systems help managers use structured data to identify problems and find solutions to business-related problems.
    10·1 answer
  • What is not one of the top health concerns in the United States?physical activitymental healthtobacco useaccess to education
    8·1 answer
  • Which three statements are true of lossless compression?
    6·1 answer
  • Question 5 of 10
    10·1 answer
  • Why should you make sure the paper being used in a printer is dry and not damp?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!