It’s either A or B, but definitely not the last two since those aren’t true. Could I possibly have brainliest? <33
Answer:
The program to this question can be given as:
Program:
#include<stdio.h>//include header file
int main() //defining main method
{
printf("Hello..! and please vote the answer."); //print value.
return 0;
}
Output:
Hello..! and please vote the answer.
Explanation:
In the given question some information is missing that is the message to be printed, In this code assume some message to be displayed, and the description to the above code as follows:
- In the above code firstly header file is included for using a basic function like print method, input method, etc.
- In the next line main method is defined, inside the main method a print function is used in this function a message is passed with a double-quote ("'). When the code will execute it will print the message that is given in the output section.
Answer:
The C++ code is given below
Explanation:
#include <iostream>
using namespace std;
int main () {
int flag=1;
do{
double ounce,metric,boxes;
cout<<"Enter weight of package in ounces: ";
cin>>ounce;
metric=ounce/35273.92;
cout<<"Metric ton is "<<metric<<endl;
boxes=35273.92/ounce;
cout<<"Number of boxes are: "<<boxes<<endl;
cout<<"Press 0 to quit else press 1: ";
cin>>flag;
}while(flag==1);
return 0;
}
Answer:
2
Explanation:
if-else is the statement that is used for checking the condition and if the condition is True, then execute the statement otherwise not executed.
initially, the value of n1 = 3, n2 = 6, n3 = 2, sumtotal = 4.
after that, if statement checks for the condition.
3 != 4
condition is TRUE, then the statement sumtotal -= n3; will be executed.
write the statement in simple form:
sumtotal = sumtotal - n3;
so, sumtotal = 4-2 = 2.
after that, the program does not check the further and exit the if-else statement.
Therefore, the answer is 2.