my homework

This is my homework
I thought that if I put this code would work but not.
#include <iostream>
#include <conio.h>
float area(float X,float Y)
{
float F;
Y>4-X^2;
return (F);
float D;
Y>X-3;
return (D);
}
int main ()
{
float X;
float Y;
float F;
float D;
std::cout<<"Introduce el valor de X:\n";
std::cin>>X;
std::cout<<"Introduce el valor Y:\n";
std::cin>>Y;
std::cout<<"La respuesta es:\n"<<area(X,Y);
getch();
if(D=F)true;
if(D<F)false;
if(D>F)false;
}

Make a diagram and coding in C ++ for given a point in the coordinate plane ( X , Y) , it is determined whether or not the area between the parabola Y = 4 -X2 and the line Y = X-3
closed account (48T7M4Gy)
So what's the problem? Do you just want someone to do your homework?
The code below is the only sensible part you have so far - it calculates the area of a rectangle.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <iostream>

float area(float X,float Y)
{
    return X * Y;
}

int main ()
{
    float X = 0, Y = 0;
    
    std::cout << "Introduce el valor de X:\n";
    std::cin >> X;
    std::cout << "Introduce el valor Y:\n";
    std::cin >> Y;
    std::cout << "La respuesta es:\n"<<area(X,Y);
}
Last edited on
Topic archived. No new replies allowed.