0

OK, so I am in my 1st semester of C++. I have already finished my 1st assignment (below), a Windows32 Console Application and it works just fine. However, if I write the program as a Windows Forms Application with a GUI, then I can earn extra credit. My problem is that I can't seen to output the assignment to a label. I have created the GUI, but only being in my 1st week of class, I am unaware how to output the same info that the Console Application displays in a label box in the GUI in a Windows Form. I need to display the following 4 items. Any help would be greatly appreciated!

// Restaurant Bill.cpp : Diplays the meal cost, tax amount, tip amount, and total bill on the screen
//

#include "stdafx.h"


#include <iostream>
using namespace std;


int main()
{
	double meal = 44.50;
	double tax = meal * 0.0675;
	double subtotal = meal + tax;
	double tip = subtotal * 0.15;
	double total = subtotal + tip;

	cout <<"Meal cost: " << meal << endl;
	cout <<"Tax Amount: " << tax << endl;
	cout <<"Tip Amount: " << tip << endl;
	cout <<"Total: " << total << endl;

	return 0;
}
2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by jumbowat
0

You will have to create a project to convert it. Making a project is simple and since its a small app, there wont be much of a trouble.....you can choose the windows option when you start to make the project. All the best.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.