Answer:
C++ code is given below
Explanation:
#include <iostream>
#include <cctype>
#include <string.h>
#include <cstring>
#include <sstream>
using namespace std;
struct Car {
public:
char reportingMark[5];
int carNumber;
string kind;
bool loaded;
string destination;
};
void input(Car *);
void output(Car *);
int main() {
Car *T = new Car;
input(T);
output(T);
delete T;
return 0;
}
void input(Car *T)
{
string str, s;
cout << " Enter the reporting mark as a 5 or less character uppercase string: ";
cin >> str;
for (int i = 0; i < str.length(); i++)
T->reportingMark[i] = toupper(str[i]);
cout << " Enter the car number: ";
cin >> T->carNumber;
cout << " Enter the kind: ";
cin >> T->kind;
cout << " Enter the loaded status as true or false: ";
cin >> s;
istringstream(s) >> boolalpha >> T->loaded;
if (T->loaded == true) {
cout << " Enter the destination: ";
cin.ignore();
getline(cin, T->destination);
}
else
T->destination = "NONE";
}
void output(Car *T)
{
cout << " Reporting Mark: " << T->reportingMark;
cout << " Car Number: " << T->carNumber;
cout << " Kind: " << T->kind;
cout << " Loaded Status: " << boolalpha << T->loaded;
cout << " Destination: " << T->destination << " ";
}
helps us for typing letters, numbers and symbols etc.
Ms- word it is , hope it was helpful
Answer:
The correct Answer is 0.0571
Explanation:
53% of U.S. households have a PCs.
So, P(Having personal computer) = p = 0.53
Sample size(n) = 250
np(1-p) = 250 * 0.53 * (1 - 0.53) = 62.275 > 10
So, we can just estimate binomial distribution to normal distribution
Mean of proportion(p) = 0.53
Standard error of proportion(SE) =
=
= 0.0316
For x = 120, sample proportion(p) =
=
= 0.48
So, likelihood that fewer than 120 have a PC
= P(x < 120)
= P( p^ < 0.48 )
= P(z <
) (z=
)
= P(z < -1.58)
= 0.0571 ( From normal table )
A i think idk im trying to earn points