#include <conio.h>
// This is only for IDEA, not a complete solution.
class price
{
public:
int rupees, paisas;
price () {};
price (int,int);
price operator + (price);
};
price::price (int x1, int y1)
{
rupees = x1;
paisas = y1;
}
price price::operator+ (price money)
{
price convert;
convert.rupees = rupees + money.rupees;
convert.paisas = paisas + money.paisas;
return (convert);
}
int main ()
{
price x1 (10,60);
price y1 (13,2);
price z1;
z1 = x1 + y1;
cout <<"Price is "<<z1.rupees << " rupees " <<"and "<<z1.paisas<<" paisas";
getch();
return 0;
}
---------- Forwarded message ----------
From: *-*-*Sadaf Rehman*-*-* <sadafi.rehman@gmail.com>
Date: Fri, Jan 21, 2011 at 12:08 PM
Subject: ●๋•νυ ¢αƒєтєяια●๋• Fwd: CS201 4th Assignment solution by Shahzad Ahmad
--
You received this message because you are subscribed to the Google Groups "*~*VU Cafeteria*~*" group.
To post to this group, send email to vu-cafeteria@googlegroups.com.
To unsubscribe from this group, send email to vu-cafeteria+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/vu-cafeteria?hl=en.
From: *-*-*Sadaf Rehman*-*-* <sadafi.rehman@gmail.com>
Date: Fri, Jan 21, 2011 at 12:08 PM
Subject: ●๋•νυ ¢αƒєтєяια●๋• Fwd: CS201 4th Assignment solution by Shahzad Ahmad
Sadaf Rehman
---------- Forwarded message ----------
From: mc100401126 Shahzad Ahmad <mc100401126@vu.edu.pk>
Date: 21 January 2011 01:05
Subject: CS201 4th Assignment solution
From: mc100401126 Shahzad Ahmad <mc100401126@vu.edu.pk>
Date: 21 January 2011 01:05
Subject: CS201 4th Assignment solution
You received this message because you are subscribed to the Google Groups "*~*VU Cafeteria*~*" group.
To post to this group, send email to vu-cafeteria@googlegroups.com.
To unsubscribe from this group, send email to vu-cafeteria+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/vu-cafeteria?hl=en.
You received this message because you are subscribed to the Google Groups "Virtual University of Pakistan" group.
To post to this group, send email to discussion_vu@googlegroups.com.
To unsubscribe from this group, send email to discussion_vu+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/discussion_vu?hl=en.
No comments:
Post a Comment