Can you please rewrite these cods for me in a simple way without the '/n' and '/t' , also show me the output of them. 1. #include using namespace std; // THE main body int main() { char...


Can you please rewrite these cods for me in a simple way without the '/n' and '/t' , also show me the output of them.




1.


#include
using namespace std;
// THE main body
int main()
{
char item1[20]="Fresh Milk", item2[20]="Apple", item3[20]="Bread",item4[20]="Coffee";
float price1=1.0,price2=2.0,price3=0.8,price4=2.5,ST_VAT1=0.05,ST_VAT2=0.10,ST_VAT3=0.5,ST_VAT4=0.15;
cout<"\t \\\"food="" stuff="" grocery="" shop\"\n\n";="" i="" used="" '/n'="" to="" make="" new="" lines="" and="" '/t'="" to="" space="" horizontally="" in="" your="">
cout<"customer>
cout<" item\t\tprice\t\tsales="" tax+="">
cout<>
cout<><><><" omr\t\t=""><><"\t\t\t><><">
cout<><><><" omr\t\t=""><><"\t\t\t><><">
cout<><><><" omr\t\t=""><><"\t\t\t><><">
cout<><><><" omr\t\t=""><><"\t\t\t><><">
cout<>
float total=price1+ST_VAT1+price2+ST_VAT2+price3+ST_VAT3+price4+ST_VAT4;
cout<><" gross="" bill-----------=""><><">
cout<><" discount------------="">
cout<><" net="" bill------------=""><><">
;
return 0;
}




2.



#include
using namespace std;
// the main body
int main()
{
std::string item[10],name;
int n;
float price[10],ST_VAT[10],tax[10],total=0.0,Net;
cout<"enter the="" number="" of="" items="" that="" should="" be="" atleast="" 5="" :="">
cin>>n;
cout<"enter the="" customer's="" name="">
cin>>name;
for(int i=1;i<>
{ std::cout<"\nenter the="" item="">>name>>price[i]>>ST_VAT[i];
tax[i]=price[i]+ST_VAT[i];
total=total+tax[i];
}
Net=total-0.05*total;
cout<"\t \\\"food="" stuff="" grocery="">
cout<"customer><><>
cout<" item\t\tprice\t\tsales="" tax+="">
cout<>
for(int i=1;i<>
cout<><><><" omr\t\t=""><><"\t\t\t><><">
cout<>
cout<><" gross="" bill-----------=""><><">
cout<><" discount------------="">
cout<><" net="" bill------------=""><><">


return 0;
}


Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here