Skip to content
View attharvaa's full-sized avatar
Block or Report

Block or report attharvaa

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
attharvaa/README.md
  • �#include using namespace std; template class Calculator { private: T num1, num2; public: Calculator(T n1, T n2) { num1 = n1; num2 = n2; } void displayResult() { cout << "Numbers are: " << num1 << " and " << num2 << "." << endl; cout << "Addition is: " << add() << endl; cout << "Subtraction is: " << subtract() << endl; cout << "Product is: " << multiply() << endl; cout << "Division is: " << divide() << endl; } T add() { return num1 + num2; } T subtract() { return num1 - num2; } T multiply() { return num1 * num2; } T divide() { return num1 / num2; } };

int main() { Calculator intCalc(2, 1); Calculator floatCalc(2.4, 1.2);

cout << "Int results:" << endl;
intCalc.displayResult();

cout << endl << "Float results:" << endl;
floatCalc.displayResult();

return 0;

}

attharvaa/attharvaa is a ✨ special ✨ repository because its README.md (this file) appears on your GitHub profile. You can click the Preview link to take a look at your changes. --->

Popular repositories Loading

  1. attharvaa attharvaa Public

    Config files for my GitHub profile.

  2. Attharva Attharva Public

    Bootcamp

  3. CUB_200_2011 CUB_200_2011 Public

    Forked from shreyanavale/CUB_200_2011