OOCP2_4

//BCA Support //www.bcasupport.xyz #include <iostream.h> #include <conio.h> class calender { int day,month,year; public: calender(){} calender(int d,int m,int y) { day=d; month=m; year=y; } void AddDays(int d) { day=day+d; } void display() { cout<<"\nDate = "<<day<<"/"<<month<<"/"<<year; } }; int main() { clrscr(); calender d1(21,12,2017); d1.display(); d1.AddDays(7); d1.display(); getch(); return 0; }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.