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 << " ";
}
The answer is D) on Oddessey Ware
is categorised as typing speed skill
Answer:
8
12
Explanation:
I made the code a bit easier to understand then worked out how it would go. Here's what I did.
number = 4
repeat until number = 8:
write 2 * number
number = number + 2
Following this itenary, we have, the system first writes "8" as it multipled 4 by 2. Number is now equal to 6.
Next repetition, the system writes "12" as it multipled 6 by 2. Now, number = 8. The proccess now stops as number is now equal to 8.
Java.lang is the answer you're looking for