Drink price calculator I have just started a course on C and wanted to test what I have learned so far. I did so by making a small program that tells you how much you should charge for a shot of a spirit you put in.
The code will ask if you want to do a calculation.  It will follow up with a question about the name, price and size of a product and respond with the calculation.
I have just learned how to use a Struct and just worked on Arrays. My next step will be to try and implement arrays to store the Structs you made and have the option to return to previous input.
How did I do so far and what could I improve on?
#include &lt;cs50.h&gt;
#include &lt;stdio.h&gt;
#include &lt;string.h&gt;
#include &lt;math.h&gt;
#include &lt;ctype.h&gt;

//structs
typedef struct
{
    string name;
    float price;
    int size;
} Bottles;


//prototypes
Bottles get_newBottle(void);

//main
int main(void)
{
    string newBottles;
    //Ask user for input, repeat untill answered correctly.
   do
   {
       do
        {
            newBottles = get_string(&quot;Do you want to calculate a new shot y/n? &quot;);
            if (strcmp(newBottles, &quot;y&quot;) == 0)
            {
                //Build struct
                Bottles newBottle = get_newBottle();
                int shotSize = get_int(&quot;What is the size of your pour of %s in ML? &quot;, newBottle.name);
                int bevCost = get_int(&quot;What percentage beverage cost do you want your drink to be? &quot;);
                float shotCost = (newBottle.price / newBottle.size) * shotSize;
                float bevPrice = ((shotCost / bevCost) * 100) *1.21;
                printf(&quot;The cost of your shot of %s is %.2f Euro. \n&quot;, newBottle.name, shotCost);
                printf(&quot;At the cost of %.2f you will have to charge %.2f Euro including 21 percent VAT. \n&quot;, shotCost, bevPrice);

            }
            else if(strcmp(newBottles, &quot;n&quot;) == 0)
            {
                printf(&quot;ok. doei!\n&quot;);
            }
        }
        while (! (strcmp(newBottles, &quot;y&quot;) == 0) &amp;&amp; ! (strcmp(newBottles, &quot;n&quot;) == 0));
    }
    while (strcmp(newBottles, &quot;y&quot;) == 0);
    return 0;
}



//extra functions
Bottles get_newBottle(void)
{
    string name = get_string(&quot;What is the name of your product? &quot;);
    float price = get_float(&quot;What is the price of your product? &quot;);
    int size = get_int(&quot;What is the size in ML of your product? &quot;);

    Bottles newName = {name, price, size};
    return newName;
}
&quot;Utility&quot; libraries
It's time to take the training wheels off, so to speak. You need to stop using cs50.h and replace it with standard calls to the C libraries. The implementation for get_string has a careful, dynamically-allocated buffer algorithm that is really not necessary for most purposes and can be replaced with simpler calls that use a fixed-size buffer. Advantages of a fixed-size buffer, other than extremely reduced complexity, include that it can enforce &quot;domain-specific limits&quot; (i.e. your product name cannot exceed 128 characters, or whatever) where get_string cannot. get_string is especially overkill for your yes/no prompt.
For an overrun-safe, simple method that is a fixed-buffer replacement for get_string, consider fgets.
Spelling
untill -&gt; until
Memory leaks
You call get_string in a loop, which allocates a new buffer every time; and you never free it. So this will happily eat all of your RAM if you let it.
Comparisons
! (strcmp(newBottles, &quot;y&quot;) == 0)

should just be
strcmp(newBottles, &quot;y&quot;) != 0

New structure initialization
It's somewhat unusual to be returning a structure instance from get_newBottle, though it isn't the end of the world. More typical is to see either

initialization of an existing structure passed by pointer, or
allocation and initialization of a new structure via malloc then returning a pointer.

This impacts performance more for huge structures, but it's still a good idea to learn.