write c++ program to read the values of a, b and c and findout values of x where, x=(a\b) - c
Answers
Answered by
0
Easy
Explanation:
#include<stdio.h>
#include<iostream.h>
void main(void)
{float a,b,c,x;
cout<<"Enter a b c respectively";
cin>>a>>b>>c;
x=(b!=0)? ((a/b)-c) :(-1) ; //if b is 0, calculation not possible
if (b!=0)cout<<"\n"<<x;
else cout<<"Operation not possible";
return;
}
Don’t hesitate to consult for doubt in the comments below and Don't forget to mark it the brainliest if it helps.. #BAL #answerwithquality
Similar questions
Social Sciences,
5 months ago
Psychology,
10 months ago
Physics,
10 months ago
Hindi,
1 year ago
Math,
1 year ago