Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Mathematical Operations (+,-,*,/)


All mathematical operation can be solved in one place use of switch case for user friendly solution 
user can Add,Sub, Div and multiply


Source Code :-

#include<iostream.h>
#include<conio.h>
void main()
{ clrscr();
  float a,b,add,sub,mul,div,choice;
  cout<<"Mathematical Operation  By   TARUN RAWAT  \n";
  cout<<"\nEnter Two Values for operation \n "; cin>>a>>b;
  cout<<"Enter your choice (type 1,2,3,4) \n";
  cout<< " 1 - Addition \n 2 - Subtract \n 3 - Division \n 4 - Multiply \n";
  cin>>choice;
  if(choice==1)
    { add =a+b;  cout<<"\n Addition is "<<add;}
  if(choice==2)
    { sub=a-b;   cout<<"\n Subtraction is "<<sub;}
  if(choice==3)
    { div=a/b;   cout<<"\n Division is "<<div;}
  if(choice==4)
    { mul=a*b;   cout<<"\n Multiplication is "<<mul;}
getch();
}




4 comments:

  1. This is an awesome post. Really very informative and creative contents. Visit my website to get best Information About Best IAS Coaching in Hyderabad.
    Best IAS Coaching in Hyderabad
    Top IAS Coaching in Hyderabad

    ReplyDelete
  2. Thank you for sharing such detailed Blog. I am learning a lot from you. Visit my website to get best Information About Top IAS coaching Institutes in Dadar
    Top IAS coaching Institutes in Dadar
    Best IAS coaching Institutes in Dadar

    ReplyDelete
  3. Great post! I really enjoyed reading and found your insights to be quite valuable. I appreciate the way you presented your ideas. It made the content easy to follow and understand. Your writing style is engaging and makes the content enjoyable to read. I look forward to more posts. Thank you for sharing this informative article.If you are interested in knowing about the 10 Best IAS Coaching Centres in Ahmedabad.

    ReplyDelete

Blogger Widgets

Find Us On Google, Just type - way2cplusplus -

If you have any questions on implementing or understanding this C++ Program , shoot me a comment and I'll be glad to help! :) :)