Answer:
#include<iostream>
Using namespace std;
int main()
{
int n, qty;
double price, amount;
cout<<"Number of items ";
cin>>n;
cout<<"ITEM<<"\t"<<"QUANTITY"<<"\t"<<"PRICE"<<"\t"<<"ITEM TOTAL";
for(int i= 1; I<= n; i++)
{
cin>>qty;
cin>>price;
amount = qty * price;
cout<<i<<"\t "<<qty<<"\t"<<price<<"\t"<<amount;
}
}
Explanation
The above program is written in C++ programming language
5 variables are declared and used in the program
n is declared as an integer to represent the total number of items
qty is declared as integer to represent the total quantity of each item
price is declared as double to represent the amount of each individual item
amount is declared as double to represent the total amount of an item; it is gotten by qty * price
i is declared as integer to iterated between each items
The amount of each item is calculated within the iteration and also printed immediately