Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

This is a C++ program. PART KEY COMBINATION You often have to enter a secret cod

ID: 3592188 • Letter: T

Question

This is a C++ program.

PART KEY COMBINATION You often have to enter a secret code or password to gain entrance to a restricted area or to gain access to a computer network. In many cases the password consists of a sequence of alphanumeric characters that must be entered in a specified order. In this exercise you create a program that "opens the door" to a restricted area when the user enters the correct two-character sequence. Step 1: Create a program that reads in characters until the user enters the correct two-character sequence (cs) to open the door Step 2: Step 3: Save your program as open aoor.cpp Test your program using the following test plan. If you discover mistakes in your program, correct them, and execute the test plan again Test Plan for opendoor Expected result Door opens Door opens Door opens Door closes Checked Test Case Legal entrance Hacker Sample data CS imacsmajor Two c's followed by ccs an S Not a valid sequence ab PART B HOT ENOUGH FOR YA? People who are originally from cities such as New York and St. Louis and who have moved to states such as Arizona and New Mexico often say that despite higher temperatures in these southwestern states, they experience less discomfort than they did in their place of origin. This discomfort is due in large part to the high rate of relative humidity in such cities as New York and St. Louis during the summer. A method for measuring the discomfort caused by humidity is the temperature-humidity index (THI) The formula for computing the THI is

Explanation / Answer

#include<iostream>
#include<string>

using namespace std;


int main(){

    string pass;
   
    do {
       cout << "Enter password :";
       cin >> pass;
       if (pass == "cs" || pass == "imacsmajor" || pass =="ccs"){
          cout << "Door opens ";
          break;
       }
       if (pass=="ab")
          cout << "Door closes ";
     } while(true);
    return 0;

}

#include<iostream>
#include<iomanip>

using namespace std;

int main(){

   double c;
   double temp = 60;
   double humid = 40;
   cout << setw(10) << " " << setw(30) << "Humidity" << endl;
   for (int i = 40; i<110; i=i+10){
   }
   cout << setw(10) << "Temp";
   for (int i = 40; i<110; i=i+10){
       cout << setw(10) << i;
   }
   cout << endl;
   for (int i = 60; i<110; i = i + 10){
      cout << setw(10) << temp;
      for (int j = 40; j<110; j = j + 10){
          cout << fixed << setw(10) << setprecision(2) << temp-0.0055*(100-humid)*(temp-58);
          humid=humid+10;
      }
      cout << endl;
      temp = temp + 10;
   }

   return 0;
}

#include<iostream>

using namespace std;

void main(){

    int num,count = 0;
    float sum = 0;

    cout << endl;
    while (count <= 3){
        cout << "Enter a number " << endl;
        cin >> num;
        sum += num;
        count++
    }
    cout << "Avearage is " << sum/count << endl;
}


void main()
{
      int j;
      for (j = 0; j <10; j++){

          for (int k = 0; k<5; k++)
              cout << '*';
          cout << endl;
      }

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote