online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <stdio.h> void main() { int day, month, year, nowday, nowmonth, nowyear, DOBday, DOBmonth, DOByear, outscreen, out, screen; printf("Enter your birthday in the format of DD, MM, YYYY (For example, May 1st 2003 would be entered as 1, 5, 2003)\n"); scanf("%d, %d, %d", &DOBday, &DOBmonth, &DOByear); printf("Enter today's date, in the previously mentioned format\n"); scanf("%d, %d, %d", &nowday, &nowmonth, &nowyear); if (DOBday>nowday) { nowday=nowday+30; nowmonth=nowmonth-1; } day=nowday-DOBday; if (DOBmonth>nowmonth) { nowmonth=nowmonth+12; nowyear=nowyear-1; } month=nowmonth-DOBmonth; year=nowyear-DOByear; printf("You are %d years, %d months, %d days old\n\n", year, month, day); if (nowmonth==DOBmonth && nowday==DOBday) { printf("By the way, Happy Birthday! You are 1 year closer to death hehe...jk\n\n"); } printf("Would you like to know how many hours you spent in your lifetime either in front of screens or outside?\n"); printf("Press 1 for hours in front of a screen. Press 2 for hours spent outside\n"); scanf("%d", &outscreen); if (outscreen==1) { if (year<1) { screen=month*60; printf("Stop worrying about your baby's screentime! However, if you must know, the baby has spent %d hours in front of a screen\n", screen); } else if (1==year || year<13) { screen=year*1825; printf("You have spent %d hours in front of a screen in your life so far. Woah, that's a lot for a kid! \n", screen); } else if(13==year || year<21) { screen=year*2555; printf("So far in your life, you hav spent %d hours in front of a screen. You know, back in the old days we actually talked to other people. In-person. I know, crazy right?!?(=_=)\n", screen); } else { screen=year*3285; printf("In your life, you have spent %d hours in front of a screen. You might tell people you are working, but we all know that Facebook is the only book that you are reading (^-^)\n", screen); } } else if (outscreen==2) { if (year<1) { printf("Stop worrying about your baby's time outside! Go get some sleep while you still can (before he/she wakes up and ruin's your sleep xd\n"); } else if (1==year || year<13) { out=year*206; printf("In your life so far, you have spent %d hours outside\n", out); printf("Geez, did you know that your parents (when they were your age) spent more than double the time outside than you are spending right now?\n"); } else if (13==year || year<21) { out=(13*206)+(year-13)*365; printf("The next time your PE Teacher asks what you did over the weekend, tell him/her that in your lifetime you have spent %d hours outside\n", out); } else { out=(13*206)+(8*365)+(year-21)*180; printf("In your life, you have spent %d hours outside. I'm pretty sure that walking around while you are waiting for the eggs to cook doesn't count as exercise LOL\n", out); } } else { printf("OMG WHY CAN'T YOU FOLLOW SIMPLE INSTRUCTIONS???? YOU BROKE THE CODE, AND WORLD WILL FALL BECAUSE OF YOU!! (*_*)"); } }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue