# AnsweredNeed some help in logic for making of the application

#### sj1597

##### New member
So I am making a windows application in which I have store my recipe proportions.
For example: if one pizza requires 200 gms flour,2 spoons of sauce,100 gms of cheese,250 gms of water...then what will be the proportions of the ingredients required for making 47 pizza's.
P.S.: I am new to coding so please forgive me if the example or something else sounds lame... I am just trying to help my father.
Thank YOU.

#### Skydiver

Staff member
I'm not seeing how this being a Windows program changes how to solve the problem. You would do the same thing regardless of this being done on a Mac, Linux, or pen and paper in your 6th Grade math class.

Is there a specific problem you are running into that figuring out how to do this is making things difficult?

#### sj1597

##### New member
I'm not seeing how this being a Windows program changes how to solve the problem. You would do the same thing regardless of this being done on a Mac, Linux, or pen and paper in your 6th Grade math class.

Is there a specific problem you are running into that figuring out how to do this is making things difficult?

I know how to work the math out i just don't know how to implement it in coding or making an application out of it. It's really tough everytime to do pen and paper thing when you are making a curry for 2000 people...you gotta maintain the same taste.

#### Sheepings

##### Well-known member
What's wrong with starting here : Math Class (System)

Unless you have some code to show, then there is nothing for us to help resolve since you haven't tried anything yet.

#### jmcilhinney

##### C# Forum Moderator
Staff member
As suggested, it's not clear what problem you actually want us to help you with. If you have quantities for 1 item and you want N items then it's fairly obvious that you need to multiply all your quantities by N. Are you really asking us how to perform a multiplication in C#? I would hope not. If you are then you it sounds like what you need to do instead is find a beginners tutorial and work your way through that to learn the basics first.

It sounds like you may be making the classic beginner mistake of treating a programming problem as a monolith. Your application is not one problem. It's a branching series of many much smaller problems. You need to stop and think about the process involved in getting from A to B, not just about A and B themselves. Think about the steps you would perform if this was a purely manual process. Break those steps into smaller and smaller parts until you can't break them down any further. Now treat each part individually and research how to implement that in code. If you can implement each part then you can do the whole thing, because the whole thing is just the sum of the parts, with perhaps a little massaging at the edges. If you can't do a particular part then you can ask us about that part specifically instead of asking us to implement an entire application for you.

#### Skydiver

Staff member
It's really tough everytime to do pen and paper thing when you are making a curry for 2000 pe
Yes. I agree. Specially when some recipes don't multiply well past times 3 or times 4 as I found out trying to do a times 10 for one of my favorite chili recipes. 1 tablespoon of siracha for one batch was good. 3 tablespoons for three batches was borderline. But 10 tablespoons for 10 batches was way too much.

#### Helper

##### New member
Very simple,
keep two textboxes.
1st textbox should contain the no.of pizzas
2nd textbox should contain the quantity required for making 1 pizza.
Then a button (Calculate)
in button1.cs :-
multiply both the textboxes .

if you dont understand , message me on [snipped]

Removed email

Last edited by a moderator:

#### rakit

##### Member
C#:
``````int nOfPizzas = 3;
int chesseForOnePizza = 100; //100gr
int waterForOnePizza = 250; // ml
int totalCheeseForNOfPizzas = nOfPizzas  * chesseForOnePizza;
int totalWaterForNOfPizzas = nOfPizzas * waterForOnePizza;``````

Last edited by a moderator: