Computer Science, asked by nithinkumar66626, 10 months ago

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 aditimoulik2001
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