c语言编程计算作业题

为x任意赋值,计算y=(1+x^2)/(x^+4√x+10)的值,编写程序代码,并运行出结果

求大佬指点!谢谢


#include<iostream>
#include <math.h>
using namespace std;
int main()
{
    int x;
    float y;
    cin>>x;
    y=(1.0+pow(x,2))/(x+4*pow(x,1/2)+10);
    cout<<y;
    return 0;    //结束程序
}

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
int main()
{
    long double x = 0, y = 0;
    printf ("Please input x:\n");
    scanf ("%Lf", &x);
    y = (1+pow(x,2))/(pow(x,2) + 4*sqrtl(x)+10);
    printf ("y=%Lf\n", y);
    return 0;
}