An anonymous error is found in my code line 27


Please tell me why output line 27 in code print extra number like hexadecimal number with actual result in the index of array

#include<iostream>
using namespace std;
int main( )
{
double p[6];
char c,y,Y;


do
{
cout<<"Enter Sale Price Of Item: \t"<<endl;
cin>>p[0];
cout<<"For Luxury Item Enter 'y': \t"<<endl;
cin>>c;
if(c=='y'||c=='Y')
{
p[1]=p[0]*0.1;
}
else
{
p[1]=0;
}
p[2]=p[0]*0.04;
p[3]=p[0]*0.015;
p[4]=p[3]+p[2]+p[1];
p[5]=p[4]+p[0];
cout<<"Total Price ="<<p[5]<<cout<<"\t+ ST "<<p[4]<<endl;
cout<<"For Again Enter Values Press 'y':\t";
cin>>c;
}while(c=='y'||c=='Y');
system("pause");

}
1
2
3
cout<<"Total Price ="<<p[5]<<cout<<"\t+ ST "<<p[4]<<endl;
                              ^
                     What is cout doing here?
You write i will remove this one and try again.
Topic archived. No new replies allowed.