Program that prints to calculate the age in days.
Object: Write a program that prints to calculate the age in days by using the formula: days = years * 365. C++ projects for beginners with source code
Code:
#include<iostream>
#include<conio.h>
#include<math.h>
using namespace std;
void main()
{
int age,days;
cout<<“Please Enter Your Age: \n\n”;
cin>>age;
days=age*365;
cout<<“\nYour Age in Days: “<<days;
getch();
}
#include<iostream> #include<conio.h> #include<math.h> using namespace std; void main() { int age,days; cout<<"Please Enter Your Age: \n\n"; cin>>age; days=age*365; cout<<"\nYour Age in Days: "<<days; getch(); }