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
34kurt
3 years ago
8

Write a loop to output the word EXAM 99 times

Computers and Technology
1 answer:
worty [1.4K]3 years ago
3 0

Answer:

Following are the answer for the given question

for(int i=1;i<=99;++i) // for loop

{

cout<<"EXAM"<<endl; // display the word EXAM

}

Explanation:

In this question we using for loop which is iterating 99 times and print the

word "EXAM  " 99 times.

The variable i is initialized by 1 and check the condition if the condition in loop  is true it will execute the loop and print "EXAM" .The loop will executed 99 times when the condition in loop is false then loop become terminated.

Following are the program in c++

#include<iostream>// header file

using namespace std;

int main() // main method

{

for(int i=1;i<=99;++i) // for loop

{

cout<<"EXAM"<<endl; // display the word EXAM

}

   return 0;

}

You might be interested in
VSphere Client is used to install and operate the guest OS. true or false
tangare [24]

Answer:

True

Explanation:

A guest Operating System (OS) is a secondary OS to the main installed OS which is the host Operating System (OS). Guest OS can either be a part of a partition or a Virtual Machine (VM). This guest OS is used as a substitute to the host OS.

vSphere Web Client can be installed by using a CD-ROM, DVD or ISO image which has the installation image to make a Virtual Machine (VM) functional.

5 0
3 years ago
Write a function sample_median(n,P) that generates n random values using distribution P and returns the median of the collected
TiliK225 [7]

Answer:

import numpy as np

def sample_median(n, P):  

   return np.median( np.random.choice ( np.arange (1, len(P) + 1 ), n, p = P ) )

print(sample_median(10,[0.1 0.2 0.1 0.3 0.1 0.2]))

print(sample_median(10,[0.1 0.2 0.1 0.3 0.1 0.2]))

print(sample_median(5, [0.3,0.7])

print(sample_median(5, [0.3,0.7])

Explanation:

  • Bring in the numpy library to use the median function provided by the numpy library.
  • Define the sample_median function that takes in 2 parameters and returns the median with the help of built-in random, choice and arrange functions.
  • Call the sample_median function by providing some values to test and then display the results.    

Output:

4.5

4.0

2.0

1.0

7 0
3 years ago
What is a algorithm?
Basile [38]
A process or set of rules to be followed in calculations or other problem-solving operations, especially by a computer.
4 0
4 years ago
Read 2 more answers
In which of the following is “y” not equal to 5 after execution? X is equal to 4.
Step2247 [10]

Answer:

d) y=x++

Explanation:

In all 3 statements:

y= ++x;

y=x=5;

y=5;

The value of y is equal to 5.

However in the statement y=x++, the value of 5 is equal to value of x prior to the increment operation. The original value of x was 4. So the value of y will be 4. Note that after the statement execution, the value of x will be updated to 5. In effect y=x++ can be visualized as a sequence of following steps:

x=4;

y=x;

x=x+1;

5 0
3 years ago
Which of the following is a true statement?
m_a_m_a [10]
Let me help you!
Did you know that both plants and animals undergo cellular respiration? The reason behind that is because both organims needs to get energy and to expel wastes.

Therefore, the correct answer for your question is: <span>C.Cellular respiration occurs in both plant and animal cells.

I hope that helped you! :></span>
4 0
3 years ago
Other questions:
  • Help me Please?!! I will put you as brainliest.<br>I hope I spelled that right.
    5·2 answers
  • The ---------------initiates a message by encoding theidea (or a thought) in words or symbols and sends it to areceiver.ChannelS
    10·1 answer
  • What is key to remember when handling linked lists?
    12·1 answer
  • Find the titles of courses in the Computer Science department that have 3 credits. Find the IDs of all students who were taught
    7·1 answer
  • Identify the correct sequence of steps to change the font from Verdana to Arial.
    10·1 answer
  • Question 6 of 10
    11·1 answer
  • A student registers for a course in a university. Courses may have limited enrollment i.e a student must
    5·1 answer
  • Determine whether or not the following pairs of predicates are unifiable. If they are, give the most-general unifier and show th
    13·1 answer
  • The analogy of a computer system is often used to illustrate the different parts of memory. The keyboard is where we encode new
    8·1 answer
  • Write a program that uses the Purchase class in 5.13. Set the prices to the following: Oranges: 10 for $2.99 Eggs: 12 for $1.69
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!