Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created Jan 18, 2021
Embed
What would you like to do?
#include<iostream>
#include<iomanip>
using namespace std;
int main(){
long number = 0;
int count = 0;
double price = 0.0;
cout<<"Please enter features of the item";
cout<<"Item No. :";
cin>>number;
cout<<"Number of Pieces: ";
cin>>count;
cout<<"Price Per Piece";
cin>>price;
cout<<"\n\tItem Number Quantity Price per piece ";
cout<<"\n\t"
<<setw(8)<<number
<<setw(16)<<count
<<fixed<<setprecision(2)
<<setw(16)<<price<<"Dollar"<<endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment