This week's book giveaway is in the NodeJS forum. We're giving away four copies of Serverless Applications with Node.js and have Slobodan Stojanovic & Aleksandar Simovic on-line! See this thread for details.
I am very new to java. I was wondering how can I calculate total age in months and store it as variable? this is what I have so far:
* You will ask the user to provide their name (as a single word, assume first name here)
* You will ask the user their age in full years (no fraction or months)
* You will ask the user how many full months since their last birthday (again, whole numbers here).
* You will use this information to calculate the user's age in months and use that information to print
* out a greeting.
Hello Amir, so if statements would be a good way to execute the last part of your code. Here is what that code would look like. P.S. I changed your variable "a" to "age" because that was what you used in your comments, and make sure and also add the additional months since the user's last birthday to the variable for total months. Hope this is helpful.
Water! People swim in water! Even tiny ads swim in water:
global solutions you can do at home or in your backyard