C Program to Make a Simple Calculator to Add, Subtract, Multiply or Divide Using switch.case Example to create a simple calculator to add, subtract, multiply. I have to make a very simple program that asks the user how many tickets he/she wants to buy. It then asks for an age for each of the tickets. Then it should be able to calculate the total cost of.
Standard deviation is a measure of spread of numbers in a set of data from its mean value. Use our online standard deviation calculator to find the mean, variance and arithmetic standard deviation of the given numbers.
Standard deviation is a measure of spread of numbers in a set of data from its mean value. Use our online standard deviation calculator to find the mean, variance and arithmetic standard deviation of the given numbers.
Formula :Mean :Mean = Sum of X values / N(Number of Values)Variance : Variance = s2 Sample Standard Deviation : Population SD :
In statistics, Standard Deviation (SD) is the measure of 'Dispersement' of the numbers in a set of data from its mean value. This is represented using the symbol σ (sigma). The formula for the Standard Deviation is square root of the Variance. Here is a free online arithmetic standard deviation calculator to help you solve your statistical questions. This can also be used as a measure of variability or volatility for the given set of data. Enter the set of values in the online SD calculator to calculate the mean, standard deviation, variance and population standard deviation.
Example:
Consider a set X = {5,10,15,20,25}
Step 1 :Age Calculator Download
Mean = Sum of X values / N(Number of values)
= (5+10+15+20+25) / 5 = 75 / 5 = 15 Hence Mean = 15 ![]() Step 2 :
To find the variance,
Subtract the mean from each of the x values, 5-15 = -10 10-15 = -5 15-15 = 0 20-15 = 5 25-15 = 10 Now square all the answers you have got from subtraction. (-10)2 = 100 (-5)2 = 25 (0)2 = 0 (5)2 = 25 (10)2 = 100 Add all the Squared numbers, 100 + 25 + 0 + 25 + 100 = 250 Divide the sum of squares by (n-1) 250 / (5-1) = 250 / 4 = 62.5 Hence Variance = 62.5 Step 3 :
Find the square root of variance,
√62.5 = 7.905 Hence Standard deviation is 7.905 To find minimum and maximum SD, Minimum SD = Mean - SD = 15 - 7.905 = 7.094 Maximum SD = Mean + SD =15 + 7.905 = 22.906 Step 4 :
To find the population SD,
Divide the sum of squares found in step 2 by n 250 / 5 = 50 Find the square root of 50, √50 = 7.07 Related Calculators:Top CalculatorsPopular CalculatorsTop Categories
Simple C++ program for age calculation
NB:Excuse me experts,this is only for beginners.........
Instructions//// 22,236 Views
1.Copy the code 2.paste it in a text file 3.save the text file as agecalc.cpp and select file type all with in the text file. 4.paste this file inside your bin folder where the Turbo C resides. 5.Open turbo C and do File->Open->Agecalc.cpp 6.press F2 to save and F9 to compile. 7.press ctrl+F9 to run the program 8.once you have compiled the program search for agecal.exe in your bin folder
Iam a person who give value to love,culture,relationships than anything other..And I believe in humankind.....
I think that you should probably think about indenting your code a little, so that the various blocks are a bit easier to pick out.
Also, I think that it's generally best to have
main() return int rather than void , that way you can check the return value of the program and see if everything went as expected.
So, your code properly formatted, with some other little bits corrected:
Hayzam_#include-3![]()
@hayzam take some time and read the post from ravenous. there is plenty to be learned there.
jin_yeugh
I definitely agree with ravenous in that an organized source is always best for you or anyone else working with the code. Otherwise a very good, precise age calculator.
I think you should taken current year and current month and same day using Computer time with help of <time.h> header file because most user want program is made in such way which only gives output without more or unnessary input.
Thanks Man
Edited by WaltP: Remover redundant false signature
vinod insan
these codes are wrong!!!!
My birthday is on 1997 9, and it is 2012 7 now it says i am 15 year and 3 month old but I'm not I have a solution for this Lucaci Andrew140
Assuming your system time is ok, this will calculate an aproximate of your years:
The age calculator is not quite right because it does not calculate the months correctly.
If the current month is less than the birth month then the years are shown as one too many. The months are calculated as 12 minus the birth months, which is incorrect in most instances. The calculation should be If (current month minus birth month) > 0 then years = current year minus birth year months = current month minus birth month else years = (current year minus birth year) - 1 months = 12 - (birth month minus current month) markwiering22
Rajeesh.N.Santhu, you made too many mistakes. He is not showing the months correctly. I am going to rewrite this program in Dutch, and whitout mistakes of course. :-D
Thanks for the idea. I already made a program to calculate temperature scales, I made a program which calculates the average and the sum, I made a program which is showing you random zeros and ones, I made a program which is giving random numbers, I made a mini-game where you can wed coins (beginning with 200 coins), and now I am going to rewrite a program which calculates your age.
I also made an article about a program like this.
'>http://www.daniweb.com/software-development/cpp/threads/432997/age-calculator#post1857497
WaltP commented: Why did you have to resurrect this bad thread just to post this about an equally bad piece of code?-3
Lucaci Andrew commented: Troll post. No need to post your own thread here, to 'advertise' it saying how marvelous your source code is comparing to this one, because it's not!-1
takuya17Mean And Std Dev Calculator
Good day..i am requesting if you can make a code of a simple registration system please.which indicates ..name.address.birthdate.age.and etc..thank you
Dev C Age Calculator Download
@takuya17 - Please don't resurrect dead threads with something completely unrelated. If you want to contract a coding job you need to do so under the Jobs and resumes section in business exchange.
Mean And Standard Dev CalculatorVishal patil78Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |