code
A Code in Computer is what You write to Run Machines / Websites or Applications
code
A Code in Computer is what You write to Run Machines / Websites or Applications
code
I wish I could just die
I love you world and my friends and family but I was useless.
I didnt want to be me I promise I tried changin whoI am but I found it impossible.
With love
me 0/
code
this_name_is_the_best_variable_name_you_should_totally_use_it = "hello world"
print(this_name_is_the_best_variable_name_you_should_totally_use_it)
code
number one lippy gloss you should come here today its the best website you will ever see!!!
code
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Restaurant_Bill_Calculator
{
public partial class RestaurantBillCalculator : Form
{
public struct Orders
{
public string item;
public double price;
}
const double TAX = 0.06; //6% tax
Orders order = new Orders();
static double subtotal = 0;
static double totalTaxes = 0;
static double total = 0;
string finalBill = "FINAL BILL: \n";
public RestaurantBillCalculator()
{
InitializeComponent();
}
private void getValues(string custOrder)
{
order.item = custOrder.Split('$')[0];
order.price = Convert.ToDouble(custOrder.Split('$')[1];
Output.Items.Add("Price: " + order.price);
finalBill += "Ordered Item: " + order.item + "\nPrice: " + order.price.ToString("C2") + "\n";
updateBill();
}
private void updateBill()
{
subtotal += order.price;
total += order.price + (order.price * TAX);
totalTaxes += order.price * TAX;
{
}
Output.Items.Clear();
Output.Items.AddRange(finalBill.Split('\n'));
Output.Items.Add("Subtotal: " + subtotal.ToString("C2"));
Output.Items.Add("Tax: " + totalTaxes.ToString("C2"));
Output.Items.Add("Total: " + total.ToString("C2"));
}
private void RestaurantBillCalculator_Load(object sender, EventArgs e)
{
}
private void dropdownSelection(object sender, EventArgs e)
{
if (sender == cmbdrinks)
getValues(cmbdrinks.SelectedItem.ToString());
else if (sender == cmbappetizers)
getValues(cmbappetizers.SelectedItem.ToString());
else if (sender == cmbmaincourses)
getValues(cmbmaincourses.SelectedItem.ToString());
else
getValues(cmbdrinks.SelectedItem.ToString());
}
private void Output_TextChanged(object sender, EventArgs e)
{
}
private void Clear_Click(object sender, EventArgs e)
{
}
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us