OOCP1_2

//BCA Support //www.bcasupport.xyz #include <iostream.h> #include <conio.h> int area(int l,int b=5); float area(float pi,int r=10); void main() { clrscr(); int l=10; float pi=3.14; cout<<"\n-> Area of rectangle : "<<area(l)<<" sq. units\n"; cout<<"\n-> Area of circle : "<<area(pi)<<" sq. units\n"; getch(); } int area(int l,int b) { return l*b; } float area(float pi,int r) { return pi*r*r; }

2 Responses

Can you make it all programs with class ??
Your all programs are very useful to the IT students.
Thank you so much for the such kind of programs

Write a 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.