无法在Visual Studio 2019中启动程序

时间:2019-09-27 01:01:09

标签: c compiler-errors

我一直在使用Visual Studio来分配编程类的作业,但收到错误消息“无法启动程序-系统找不到指定的文件”。我检查了一些针对此错误的解决方案,并尝试对其进行测试,但没有一个解决方案。也许我的编码有问题。这是代码(尚未完成):

#define _CRT_SECURE_NO_WARNINGS
#define PI=3.1415
#include <stdio.h>
#include <math.h>
#include <conio.h>

/**************************************************************************
     Function: display_myInfo()
     Input Paramaters: none
     Output data type: void
     Task: This function displays my name, email, and lab section to the screen in a box of star.
****************************************************************************/
void display_myInfo() {
    printf("\n**********************************");
    printf("\n*   CNIT 105 Assignment_5        *");
    printf("\n*  xxxxxxxxxxxxxxxx              *");
    printf("\n*   xxxxxxxxxxxx@xx.edu          *");
    printf("\n*   Lab section = Fri. 11:30     *");
    printf("\n**********************************");
}

/**************************************************************************
     Function: compute_cylinder_surface()
     Input Paramaters: radius and height (both float)
     Output data type: float
     Task: Compute the surface area of a cylinder and return it as output. The surface are of a cylinder is the area of its side plus 2 times area of its base.
****************************************************************************/
float compute_cylinder_surface(float height, float radius) {
    float SA;
    SA = 2 * PI * radius * height + 2 * pi * pow(radius, 2);
}

/**************************************************************************
     Function: compute_sphere_area()
     Input Paramaters: Input parameter: radius (float)
     Output data type: float
     Task: Compute the surface area of a sphere, and return it as output. The surface are of a cylinder is the area of its side plus 2 times area of its base.
****************************************************************************/
void compute_sphere_area(float radius) {
    float SA;
    SA = 4 * PI * pow(radius, 2);
}
/**************************************************************************
     Function: verify_triangle()
     Input Paramaters: 3 float
     Output data type: int (1 or 0)
     Task: Verify if the input numbers from a triangle, if the sum of every 2 numbers is greater than third. In other words, all three conditions must be true.
****************************************************************************/

int verify_triangle(float a, float b, float c) {
    if (a + b > c && b + c > a && a + c > b) {
        return 1
    }
    else {
        return 0
    }
}

/**************************************************************************
     Function: compute_area_triangle ()
     Input Paramaters: 3 float
     Output data type: float
     Task: Compute the area of triangle
****************************************************************************/
float compute_area_triangle(float a, float b, float c) {
    float S;
    float Area;
    if (verify_triangle(a, b, c) == 0)
        printf("The input numbers do not form a triangle");
}
else {
S = (a + b + c) / 2;
Area = sqrt(S * (S - a) * (S - b) * (S - c));
return area;
}

int main() {
    float radius;
    float height;
    float area;
    float S;

    int display_myInfo();

}

有人可以帮助我解决此错误吗? 谢谢。

0 个答案:

没有答案