Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given variables grade, region, and amount, declare and assign the following pointers: character pointer gradePointer is assigned with the address of grade. integer pointer regionPointer

Given variables grade, region, and amount, declare and assign the following pointers:

character pointer gradePointer is assigned with the address of grade.

integer pointer regionPointer is assigned with the address of region.

double pointer amountPointer is assigned with the address of amount.

Ex: If the input is B 3 1000.0, then the output is:

Oil grade: B Region of import: 3 Quantity: 1000.0

#include #include using namespace std;

int main() { char grade; int region; double amount; /* Your code goes here */ cin >> grade; cin >> region; cin >> amount;

cout << "Oil grade: " << *gradePointer << endl; cout << "Region of import: " << *regionPointer << endl; cout << "Quantity: " << fixed << setprecision(1) << *amountPointer << endl;

return 0; }

c++ and please please make it correct

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions