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
Alborosie
3 years ago
6

Write a cout statement that prints the value of a conditional expression. The conditional expression should determine whether th

e value of the score variable is equal to 100. If so, it should print “Perfect”, otherwise it should print “Nice try”.
Computers and Technology
1 answer:
MissTica3 years ago
7 0

Answer:

The explanation to this question is given below in the explanation section.

Explanation:

#include <iostream>

#include <string>

using namespace std;

int main()

{

   int score;

   cout << "Enter Score: \n";

   cin>>score;

   if (score == 100)

//whether the value of the score variable is equal to 100

   {

       cout << "Perfect ";

//If so, it should print “Perfect”

   }

   else

   {

       cout << "Nice Try ";  

   }

 

}

     

     

You might be interested in
The memory management layer is the part of the kernel that serves out all memory allocation requests.
svetlana [45]
Most likely it’s False . But look it up just in case
4 0
3 years ago
Write a program whose input is a string which contains a character and a phrase, and whose output indicates the number of times
kramer

Explanation:

1

Ex: If the input is:

z Today is Monday

the output is:

0

Ex: If the input is:

n It's a sunny day

the output is:

2

Case matters.

Ex: If the input is:

n Nobody

the output is:

0

n is different than N.

Learning Python

8 0
3 years ago
Read 2 more answers
1. Which of the following is an example of reusing? (select the best answer)
Alina [70]
1. C. you are reusing, because instead of throwing the couch away, you gave it to someone who will "reuse" it.

2. I'm not sure, but I would say B. recycling. Repurposing things that you have no use for limits how much waste there is and how much must be manufactured. This reduces pollution and limits the burden on the environment.

3. A. is the answer, it is pre-consumer waste because the waste is from the manufacturing process. The waste is not from the consumer(whoever buys the product) so not B. and I doubt it is C. or D.

4. A. is the answer. Burning waste produces greenhouse gasses. B. can't be true, because the gasses from the burning are not the raw material. C. and D. couldn't be the case because water was not present in the disposal.

5. is A. compost center because they only take green waste.

6. A. the orange peal is the only option that is biodegradable.
4 0
4 years ago
Why would you use a custom filter?
Angelina_Jolie [31]

Answer:By specifying conditions, you can create custom filters that narrow down the data in the exact way that you want. You do this by building a filter. If you've ever queried data in a database, this will look familiar to you. Point to either Number Filters or Text Filters in the list.

Explanation:

5 0
3 years ago
Sentence Deobfuscate Name this file deobfuscate.cpp Hints: Don’t overthink this problem. Prompt the user to enter a collection o
nordsb [41]

Answer:

In C++:

#include <iostream>

using namespace std;

int main(){

   string text,lengt;

   cout<<"Please enter obfuscated sentence: ";    cin>>text;

   cout<<"Please enter deobfuscation details: ";    cin>>lengt;

   string t1, t2;

   int kount = 0;

   for(int i = 0;i<lengt.length();i++){

   kount+=(int)(lengt[i]-'0');

   t1 = text.substr(0, kount);

   t2 = text.substr(kount, text.length()-1);

   text = t1 +" "+ t2;

   kount++;   }

   cout<<"Deobfuscated sentence: "<<text;

   return 0; }

Explanation:

This declares the text and the deobfuscation details as string

   string text,lengt;

This prompts for the sentence

   cout<<"Please enter obfuscated sentence: ";     cin>>text;

This prompts for the details

   cout<<"Please enter deobfuscation details: ";     cin>>lengt;

t1 and t2 are declared as string. They are used to split the texts into 2 parts

   string t1, t2;

This declares and initializes a count variable to 0  

   int kount = 0;

This iterates through the deobfuscation details

for(int i = 0;i<lengt.length();i++){

This gets each deobfuscation character

   kount+=(int)(lengt[i]-'0');

The next two instructions splits the text into 2

This gets from 0 to kount.

   t1 = text.substr(0, kount);

This gets from kount to the last index

   t2 = text.substr(kount, text.length()-1);

The new string or sentence is calculated here

   text = t1 +" "+ t2;

The kount variable is incremented by 1

   kount++;   } The loop ends here

This prints the new sentence

   cout<<"Deobfuscated sentence: "<<text;

<em>See attachment for program file</em>

Download cpp
7 0
3 years ago
Other questions:
  • Which type of data in es changes least frequently?
    15·1 answer
  • How many frequencies does a full-duplex qam-64 modem use?
    8·2 answers
  • Implement function translate() that provides a rudimentary translation service. The function input is a dictionary mapping words
    9·1 answer
  • Why is ipsec considered to be a transparent security protocol?
    6·1 answer
  • Write a function called list_codons which takes a single argument called orf (expected to be a string representing an ORF sequen
    7·1 answer
  • Susan needs to use a lookup function to find an exact match of an inventory item, so she will set the range_lookup value to ____
    9·1 answer
  • Your friend gave you a flash drive containing photos from a weekend event. After you copy the files, you notice a bunch of .DS f
    6·1 answer
  • If the old and new systems are operated side by side until the new system has proven itself, this type of system conversion plan
    11·1 answer
  • PLSSSSS HELPP!! Tropical rainforests are home to many kinds of birds, including parrots, toucans and eagles. Each different spec
    9·2 answers
  • One rule in the Java programming language is that you have to place a semicolon at the end of each statement. What is this rule
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!