C+and+C+plus+plus

This is a basic source program example based on the first example to create a program that takes a person's age in years and converts it into their age in days.

And here's a little of what it looks like.

This is just a short and easy introduction into C programming based off of the Age in years to Age in days. NOTES: //indicates a comment that will not be read by the computer but is useful to explain each part of the program//

//Age determiner.cpp : Defines the entry point for the console application.//

using namespace std; //adds in the name space// int main( void ) //initializes the main program// {int integer1; //initializes the variable integer1// int integer2; //initializes the variable integer2// int sum; //initializes the variable sum//
 * 1) include  //pulls in the stdio library//
 * 1) include //pulls in the iostream library//

printf( "Please provide your age in years.\n"); //displays the quoted text and creates a new line// scanf("%d", &integer1); //scans input from the user and stores it in variable integer1///

//integer2 = 365.25;// sets the variable integer2 to the value 365.25

//sum = integer1 * integer2;// sets the variable sum to be the result of multiplying the two integer variables

//printf( "Your age in days is %d\n", sum);// displays the quoted text including the result of the variable sum //system("pause");// pauses the program to leave the result displayed

//return 0;// signals the program has successfuly ended// } I also have started a page for us to use as a base to share tips with C or C++ code. It is the "C and C plus plus" page. Feel free to add to it, comment, and use/post code.