C

0 chinesh doshi · August 8, 2015
#include <stdio.h>
#include <stdlib.h>
int calsum (intx , inty , intz);
int main()
{
    int a , b , c , sum ;
    printf("enter no. \n");
    scanf("%d %d %d",&a,&b,&c);
    sum=calsum(a , b , c);
    printf("sum= %d \n" , sum);
    return 0;
}
int calsum (intx , inty , intz)
{
    int d;
    d=x+y+z;
    return(d);
}


why this not working

Post a Reply

Replies

Oldest  Newest  Rating
+3 Jon Z. · August 9, 2015
You need spaces between the variable type and the variable name.




// not int calsum (intx , inty , intz)

//rather
int calsum (int x , int y , int z)
// spaces ^ ^ ^
  • 1

C

107,010 followers
About

One of the most popular languages of all time.

Links
Moderators
Bucky Roberts Administrator