C++ Program – Calculation using p = (w+x/0/(y-z)

by Nideesh C on May 1, 2011 · 0 comments

in C++




/* Read the values of w,x,y,z & display value of p = (w+x/0/(y-z) */ 

 #include<iostream.h>
 #include<conio.h>
 void main()
 {
 clrscr();
 int w,x,y,z;
 float p;
 cout<<"Enter 4 numbers"<<endl;
 cin>>x>>y>>z>>w;
 p=(w+x)/(y-z);
 cout<<"(w+x)/(y-z) = "<<p;
 getch();
 }  



Not Satisfied ? Just search & get the result

Related Posts Plugin for WordPress, Blogger...
Be Sociable, Share!

Related posts:

  1. C++ program – Implementation of class
  2. C++ program – Swap two variables using function overloading
  3. Sample – convert temperatures
  4. C++ program – Convert Height to feet and Inches
  5. Sample – compute square roots using Newton’s method

Leave a Comment

Previous post:

Next post: