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
The superclass Calculator contains: a protected double instance variable, accumulator, that contains the current value of the ca
yawa3891 [41]

Answer:

The following program are written in JAVA Programming Language.

//inherit the Calculator class

public class CalculatorWithMemory extends Calculator {  

   private double memory = 0.0;    //initialize double type variable

   public void save() {   //define function

       memory = accumulator;    

   }

   public void recall() {   //define function

       accumulator = memory;

   }

   public void clearMemory() {   //define function

       memory = 0;     //initialize the value

   }

   public double getMemory() {  

       return memory;    // return the value in "memory" variable

   }

}

Explanation:

Here, we inherit the property of the "Calculator" class.

Then, we define the private double type variable "memory" and assign value 0.0.

Then we set the function "save()" inside it we assign the value of "memory" in "accumulator" and close the function.

Then, we define the function "recall()" inside it we assign the value of "accumulator" in "memory" and close the function.

Then we set the function "clearMemory()" inside it we assign "memory" to 0.

After all, we set the double type function "getMemory()" inside we return the value of the "memory".

7 0
3 years ago
PLEASE HELP ASAP I WILL GIVE BRAINLIEST TO CORRECT ANSWER
salantis [7]
The correct answer is letter b
8 0
3 years ago
Read 2 more answers
When you use the Copy and Paste commands, you are accessing...?
vampirchik [111]
C!!!!!!!!!!!!!!!!!!!
3 0
3 years ago
Read 2 more answers
What is the main function of a file extension?
patriot [66]

To indicate which program is needed to open it

8 0
3 years ago
There are many programming languages in robotics. Each language has its own advantage. According to your opinion, which language
Dmitriy789 [7]

Answer:

you can use the notepad and *if your on windows 10* you can HTML and create websites and you can also use binary code*but that will take .2 BILLION years.

Explanation:

my point is just ask your teacher

3 0
3 years ago
Other questions:
  • 11.
    11·1 answer
  • When you notice a safety hazard, what should your first step be?
    12·1 answer
  • When protecting a worksheet all cells are locked by default.?
    10·1 answer
  • Georgenotfound??? question mark??
    15·2 answers
  • Signing up for a(n) ____ will automatically provide you with web content that is updated on a regular basis.
    15·1 answer
  • Which one of these tasks is part of the pre-production phase of game development?
    5·2 answers
  • How would you convert an integer value to a float value in Python?
    10·1 answer
  • How do I find a back door password on my computer?
    12·1 answer
  • Why are Quick Parts useful in an Outlook message?
    5·1 answer
  • Date
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!