Computer Science, asked by ronisub48, 11 months ago

Write a C program for the function F(x)=max{|2x-1|,9-x^2}
How do you write it?
I also tried to write it but I failed:
#include
#include

int main()
{
int F(int x);
int a,b ;
a = 2*x-1 ;
if(a<0)
a = 0-a ;
if(a>=0)
a = a+2 ;
printf("The value of a is %d\n",a) ;
scanf(" %d ", &a );
b = 9 - x*x ;
printf("The value of b is %d\n",b);
scanf(" %d ", &b );
if(a>b)
return a;
else
return b;
printf(" The value of F(1) is %d\n",F(1));
}

Answers

Answered by Mansikundu
4

Answer:

i dont like computer

so i dont know it

Similar questions