سورس کد پروژه دریافت تاریخ و نمایش سن به زبان سی پلاس پلاس
در این مطلب سورس کد پروژه دریافت تاریخ و نمایش سن به زبان سی پلاس پلاس را که بصورت حرفه ای برنامه نویسی شده است را برایتان آماده کرده ایم.این پروژه صرفا جنبه آموزشی و یادگیری دارد که می توانید براحتی از سایت سورس ایران دریافت نمایید.از جمله امکانات این پروژه می توان به دریافت نام کاربری ، دریافت تاریخ تولد به میلادی ، دریافت تاریخ روز و گرافیک کاربر پسند اشاره نمود.بعلاوه می توانید سورس کد پروژه محاسبه هر روز از هفته به زبان سی پلاس پلاس را نیز می توانید از سایت ما دانلود نمایید.
#include<iostream.h> #include<conio.h> #include<dos.h> #include<stdio.h> #include<string.h> #include<stdlib.h> class body { int i,j,d,m,y,d1,m1,y1; char nm[20]; public: void manu(); void input(); void calc(); void enter(); }; void body::enter() { gotoxy(25,12); cout<<"Enter Your Name:"; gotoxy(42,12); cin>>nm; } void body::manu() { gotoxy(10,1); cprintf("%c",218); gotoxy(70,1); cprintf("%c",191); gotoxy(10,21); cprintf("%c",192); gotoxy(70,21); cprintf("%c",217); gotoxy(10,3); cprintf("%c",192); gotoxy(70,3); cprintf("%c",217); for(i=1;i<=59;i++) { gotoxy(10+i,1); cprintf("%c",196); } for(i=1;i<=59;i++) { gotoxy(10+i,3); cprintf("%c",196); } for(i=1;i<=19;i++) { gotoxy(10,1+i); cprintf("%c",179); } for(i=1;i<=19;i++) { gotoxy(70,1+i); cprintf("%c",179); } for(i=1;i<=59;i++) { gotoxy(10+i,21); cprintf("%c",220); } for(i=1;i<=59;i++) { gotoxy(10+i,8); cprintf("%c",196); } for(i=1;i<=59;i++) { gotoxy(10+i,10); cprintf("%c",196); } for(i=1;i<=59;i++) { textcolor(RED); gotoxy(10+i,15); cprintf("%c",196); } gotoxy(11,16); textcolor(GREEN+BLINK); cprintf("Note"); gotoxy(16,16); textcolor(YELLOW); cprintf("Exampal:_20 Year -1Month -2Day"); gotoxy(11,17); cprintf("20Year-1Month=19Year & 10month Month: 31Days-2Days=29Days\n"); gotoxy(11,18); textcolor(WHITE); cprintf("19Year 10 Month 29"); gotoxy(37,9); textcolor(RED); cout<<"RESULT"; gotoxy(30,2); textcolor(RED); cprintf("AGE CALCULATE SYSTEM"); gotoxy(57,20); textcolor(BLINK+GREEN); cprintf("By KR KUMAWAT"); } void body::input() { gotoxy(11,4); cout<<"Enter Your D.O.B.(Ex.2 7 1992) :"; gotoxy(11,5); cout<<"Enter Current Date(Ex.28 9 2012) :"; gotoxy(45,4); cin>>d>>m>>y; gotoxy(45,5); cin>>d1>>m1>>y1; } void body::calc() { int rd,rm,ry; rd=d1-d; rm=m1-m; ry=y1-y; textcolor(WHITE); gotoxy(11,13); cprintf("Nmae :");cout<<nm; gotoxy(11,14); cprintf("Age :");cout<<ry;cprintf("Year ");cout<<rm;cprintf("Month ");cout<<rd;cprintf("Days"); } void main() { clrscr(); body b; b.enter(); clrscr(); b.manu(); b.input(); b.calc(); /*gotoxy(30,18); textcolor(RED); cprintf("Do you want Exit(Y/N) :"); char ch; gotoxy(53,18); cin>>ch; if(ch=='y'||'Y') { exit(0); } else { main(); }*/ getch(); }
دیدگاه کاربران
تعداد دیدگاه های کاربران : ۰ دیدگاه