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

DQuestion 9 6 pts (6 Pts) Which if statement below will implement the logic, all

ID: 3589617 • Letter: D

Question

DQuestion 9 6 pts (6 Pts) Which if statement below will implement the logic, all countries except Canada and Mexico are charged a 10% import duty? ift country ""Canada" && country-="Mexico" ) total"-1.10; ift country ="Canada" ll country--"Mexico") total"-1.10; ift country !="Canada" ll country le"Mexico") total"-1.10; ift country !="Canada" && country--"Mexico") total"-1.10; DQuestion 10 3 pts (3 Pts) What is the value of setting after this assignment statement? int setting: setting = (29 / 865) . 96877 8752235; 2B,426400 847,890,000 Overflow, number too large for an int

Explanation / Answer

Question 9:

Answer: Option d) if(country!="Canada" && country!="Mexico")
  
{
  total*=1.10;
}

Explanation :

Program:

#include <iostream>

using namespace std;

int main() {
int total;
string country="America";
if(country!="Canada" && country!="Mexico")
{
total*=1.10;
cout<<"total = " << total;
}
}

Output:

total = 0

Question 10:

Answer: Option b) 0
Explanation :
Program:

#include <iostream>

using namespace std;

int main()
{

int setting;
setting= (29 / 865) * 96877*8752235;

cout<<"setting = " << setting;

}

Output:
setting = 0

Question 8:

Answer:
Option a)switch(fruit)
{
case 'A' : cout<< "Apple"<<endl;
break;
case 'B' : cout<< "Banana"<<endl;
break;
case 'O' : cout<< "Orange"<<endl;
break;
default:
cout<< "Unknown"<<endl;
}

Explanation :
Program:

#include <iostream>

using namespace std;

int main() {
char fruit;
cout<<"Enter any char for Fruit: ";
cin>>fruit;
switch(fruit)
{
case 'A' : cout<< " Apple"<<endl;
break;
case 'B' : cout<< "Banana"<<endl;
break;
case 'O' : cout<< "Orange"<<endl;
break;
default:
cout<< "Unknown"<<endl;
}
}
Output:
Enter any char for Fruit: A

Apple

Question 8:

Answer:
Option a)int length,width,height, surface=0;
cout<<"Enter length width and height of a box"<<endl;
cin>>length>>width>>height;
surface=2*(length*width+ width*height +length*height)

Explanation :
Program:

#include <iostream>

using namespace std;

int main() {
int length,width,height, surface=0;
cout<<"Enter length width and height of a box"<<endl;
cin>>length>>width>>height;
surface=2*(length*width+ width*height +length*height);
cout<< "surface = "<<surface;
}
Output:
Enter length width and height of a box

10 20 30

surface = 2200

Question 5:

Answer:  Option d) 10 20
Explanation :
Program:

#include <iostream>

using namespace std;

int main() {
int num1=0,num2=0;
num1=14;
if(num1=10)
num2=2*num1;
cout<<num1<<" "<<num2<<endl;
}
Output:
10 20

Question 6:
Answer: Option a) 18
Explanation :
Program:

#include <iostream>
using namespace std;
int main() {
int num;
cout<<" Enter an integer"<<endl;
cin>>num;
if(num==12)
num+=2;
num*=2;
cout<<num<<endl;
return 0;
}
Output:
Enter an integer
9
18