Answer:
Here the code is given as,
Explanation:
Code:
#include <math.h>
#include <cmath>
#include <iostream>
using namespace std;
int main() {
int v_stop = 0,count = 0 ;
int x;
double y;
int t_count [100];
double p_item [100];
double Total_rev = 0.0;
double cost_trx[100];
double Largest_element , Smallest_element;
double unit_sold = 0.0;
for( int a = 1; a < 100 && v_stop != -99 ; a = a + 1 )
{
cout << "Transaction # " << a << " : " ;
cin >> x >> y;
t_count[a] = x;
p_item [a] = y;
cost_trx[a] = x*y;
v_stop = x;
count = count + 1;
}
for( int a = 1; a < count; a = a + 1 )
{
Total_rev = Total_rev + cost_trx[a];
unit_sold = unit_sold + t_count[a];
}
Largest_element = cost_trx[1];
for(int i = 2;i < count - 1; ++i)
{
// Change < to > if you want to find the smallest element
if(Largest_element < cost_trx[i])
Largest_element = cost_trx[i];
}
Smallest_element = cost_trx[1];
for(int i = 2;i < count - 1; ++i)
{
// Change < to > if you want to find the smallest element
if(Smallest_element > cost_trx[i])
Smallest_element = cost_trx[i];
}
cout << "TRANSACTION PROCESSING REPORT " << endl;
cout << "Transaction Processed : " << count-1 << endl;
cout << "Uints Sold: " << unit_sold << endl;
cout << "Average Units per order: " << unit_sold/(count - 1) << endl;
cout << "Largest Transaction: " << Largest_element << endl;
cout << "Smallest Transaction: " << Smallest_element << endl;
cout << "Total Revenue: $ " << Total_rev << endl;
cout << "Average Revenue : $ " << Total_rev/(count - 1) << endl;
return 0;
}
Output:
Answer:
if(y==0)
{
x=100;
}
Explanation:
The above written if statement is for assigning 100 to x when the value of y is equal to 0.To check the value of the y I have used equal operator == which returns true when the value on it's left side is equal to the value to it's right else it returns false and for assigning the value to y I have used assignment operator =.
First it will be checked that the value y is equal to 0.If the then it return true means the if statement will execute.Inside if statement 100 is assigned to x.
Input a String:
code
Input an integer:
3
eeedddoooccc
import java.util.*;
public class myClass {
public static void main(String args[]) {
Scanner scan = new Scanner(System.in);
System.out.print("Input a String: ");
String str = scan.nextLine();
System.out.print("Input an integer: ");
int num = scan.nextInt();
for(int i=str.length()-1; i>=0; i--) {
for(int j=0; j<num; j++) {
System.out.print(str.charAt(i));
}
}
}
}
hybrid car
hydrogen car
petrol car
There are different aspect of cars that cannot be recyclable. In petrol cars, The aspect that cannot be recycled is used gear oil, windshield wiper solution, brake fluid, power steering fluid, etc.
This is because they are very toxic substances, as they have lead and poisonous ethylene glycol in them.
Learn more about recyclable from
B. Quantitative risk assessment
C. Qualitative assessment of risk
D. Business impact scoring
E. Threat modeling
Answer:
The correct answer to the following question is option B). Quantitative risk assessment.
Explanation:
QRA ( Quantitative Risk assessment) is the objective risk assessment tool that is used to project threat impacts.
Quantitative Risk Assessment provides the estimate of magnitude of the consequences for each of the identified budget threats.
It set out to measure, define, provide, and predict the confidence level of the likelihood and the occurrence of the threat impacts.