Issue
I have successfully compiled my code, but it says this:
Note: You can also run your application by typing 'run' followed by any command line arguments. Starting application without args... Checking Libraries... Copying files... Processing Files... Compiling... Failed to zip binaries! Application Exited.
I want my code to have the user enter three numbers, with spaces in between, and have them be multiplied, so here is my code:
#include <stdio.h>
#include <stdlib.h>
int mult( int x, int y, int z) {
return x * y * z;
int main()
{
int x;
int y;
int z;
printf("Input two integers to be multiplied: ");
scanf("%d", &x);
scanf("%d", &y);
scanf("%d", &z);
printf("The product of the three numbers is %d\n", mult( x, y, z) );
getchar();
}
int mult (int x, int y, int z)
{
return x * y * z;
}
}
I am using compilr.com as my development platform.
Solution
Your code contains syntax errors. mult
is defined twice, and there are problems with braces. Besides, if you are using C89, main
should return a value.
Answered By - md5 Answer Checked By - Terry (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.