C# Programming Exercise
I’m taking a little detour from the normal tutorials I do. School has started again and I’m taking C# programming. From time to time I may make videos on solving the various problems given in class as I have done in this C# video.
Find out where your website ranks with your chosen keywords in Google, Yahoo and Bing.
14 day free trial. No credit card required.
In this C# Visual Studio 2010 Programming Exercise Video We will Learn:
– C# Sharp User Input, Perform Math Calculations, Display Output on Screen
– Design a program in C# that asks the user to input numerical information and the program performs calculations and provides output on-screen. Have the output display in currency where appropriate. We will open Microsoft Visual Studio 2010 to create the new C # program.
– The C# source code used in this video is below the video.
C# Programming Problem
Write a program that computes the amount of money the computer club will receive from the proceeds of their candy sales project. They sold 37 cases, which had 12 bars per case. The candy bars were sold for $0.75 each. Each case cost $5.00. They are required to give the student government association (SGA) 10% of their earnings. Display proceeds formatted in currency.
Steps needed to display the proceeds:
To write this program in C# we will need to know what we want the program to do to give the results we seek. The steps to create this C# program are as follows:
- Determine the cost of goods sold (COGS). The cost of the candy bars.
- Determine the amount of candy bars sold.
- Determine the total amount of sales from the candy bars.
- Determine the Gross Profit of the candy bars. Total sales – COGS
- Determine the Net Profit the computer club made. Gross Profit – SGA dues
Recommended C# Course
Source Code for this C# program:
To get the C# source code used in this video, click here and a new window will open so you can copy the C# code.