Dev C++ Exe Cannot Calculate Output

  • In the Configure your new project dialog box, select the Project name edit box, name your new project CalculatorTutorial, then choose Create. An empty C Windows console application gets created. Console applications use a Windows console window to display output and accept user input.
  • Jun 04, 2012  Actually - maybe a further information here - after I change the CONSTANT from 1000 to 100 in the header file, immediately compiles it at the header page (which I assume Dev C 4.9.9.2 will immediately compile the whole project), the compilation takes 1 sec to complete.
  1. Dev C++ Exe Cannot Calculate Output File
  2. Dev C++ Exe Cannot Calculate Output Windows 10

Simple C++ program for age calculation
NB:Excuse me experts,this is only for beginners.....

Instructions////
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

C Code for simple age calculator Home. Programming Forum. Iam using Dev-C Its Working Like a Charm. Computer time with help of header file because most user want program is made in such way which only gives output without more or unnessary input. Jan 09, 2018  Measure execution time of a function in C We can find out the time taken by different parts of a program by using the std::chrono library introduced in C 11. We have discussed at How to measure time taken by a program in C. Visual C Dialog Based Application - Basic Calculator Application I have come up with basic calculator application using Visual C - Dialog based application. Scroll down to see the download instructions and output. A little calculator written in BCX basic and then translated to C code and modified to compile with Dev C (GCC/G). Once you find your way past the standard GUI gibberish you can figure it out. For those who need some hand holding with the Dev C IDE.

22,298 Views

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.

Kickbox Fine-tuning of oscillators. ADSR envelopes provided for each oscillator.

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
Dev C++ Exe Cannot Calculate Output
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

takuya17

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++ Exe Cannot Calculate Output File

@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.

Vishal patil78

Dev C++ Exe Cannot Calculate Output Windows 10

You mean that's going to be the case the compiler is wrong? Because after recompiling it, the code becomes more or less correct - 24/25 are more correct than 8/9. So I thought it has to be the problem of compiler if compiling the same code can give different answers?
Actually I think its two bugs here - the 30/31 is one bug (which I have some idea what it MIGHT be now), and yet the recompiling is another bug..
But anyway.. The recompiling issue here first..
Actually - maybe a further information here - after I change the CONSTANT from 1000 to 100 in the header file, immediately compiles it at the header page (which I assume Dev C++ 4.9.9.2 will immediately compile the whole project), the compilation takes 1 sec to complete. And the answer is wrong.
But if I then go to a random cpp change, delete a colon then add a colon then then compile again, this time the compiler will take 4 or 5 seconds to complete.
Could it be that - the compiler has some assumptions that if no cpp files are changed then it will compile something less - something like that?
Bosco