Providing you codes will not help you either and you are not helping yourself. I'd suggest you to start learning the basics and understand how stuff works. Learn one step at a time. Now if you are having confusions about the code that you've tried then that's the time for you to post your query here.
I don't mind helping people who are stuck, but I don't want to spend time doing other people's homework, as they're only cheating themselves. All i'm saying is I'm very much willing to help as long as you are also willing to help yourself. Providing a screenshot to your homework without even stating what language and what application you are going to use doesnt help you to become a good one. I hope you don't get this post wrong, i'm just giving you a helpful advise so you can do better in the future.
Pankaj Kumar ChoudharyPosted May 19, 2015, 8:05 AM
{
double Total_Purchase=0;
Dictionary
Dictionary
Products["AAA"] = 5.00;
Products["BBB"] = 7.00;
Products["CCC"] = 2.30;
Products["DDD"] = 1.70;
Products["EEE"] = 9.00;
Product_Sold["BBB"] = 2;
Product_Sold["DDD"] = 4;
Product_Sold["EEE"] = 1;
Console.WriteLine(" " + "My Street Shop \n");
Console.WriteLine("ProdCode Quantity Price Amount(RM)");
foreach (KeyValuePair
{
foreach (KeyValuePair
{
if (Sell.Key == Prod.Key)
{
Console.WriteLine(" "+Sell.Key + " " + Sell.Value + " " + Prod.Value + " " + (Sell.Value * Prod.Value));
Total_Purchase += Sell.Value * Prod.Value;
break;
}
}
}
Console.WriteLine("\n\n Total Purchase =RM{0}", Total_Purchase);
Console.ReadLine();
}
Amex JohnnyPosted May 19, 2015, 10:10 AM
Amex JohnnyPosted May 19, 2015, 7:17 AM
Vincent Maverick DuranoPosted May 19, 2015, 5:23 AM
Providing you codes will not help you either and you are not helping yourself. I'd suggest you to start learning the basics and understand how stuff works. Learn one step at a time. Now if you are having confusions about the code that you've tried then that's the time for you to post your query here.
I'd also suggest to give this article a read: http://www.c-sharpcorner.com/UploadFile/8c19e8/programming-problems-and-finding-solutions/
Pankaj Kumar ChoudharyPosted May 18, 2015, 11:55 PM
Amex JohnnyPosted May 18, 2015, 7:28 PM
Amex JohnnyPosted May 18, 2015, 7:21 PM
Vincent Maverick DuranoPosted May 18, 2015, 2:09 PM
Pankaj Kumar ChoudharyPosted May 18, 2015, 2:02 PM