find the eror

Question

#include<stdio.h>
void sqr_it(int num);
int main()
{

sqrt(10.o);
return 0;

}void sqr_it(int num)
{

printf(“%d”num*num);

}

in progress 0
Anup Sen 1 month 1 Answer 34 views 0

Answer ( 1 )

  1. you made three errors.
    1. function name mismatch
    2. you wrote 10.o instead of 10.0
    3. you wrote %d in the last printf() in the wrong way.

    here is the correct code

    #include
    void sqr_it(int num);
    int main()
    {

    sqr_it(10.0);
    return 0;

    }void sqr_it(int num)
    {

    printf(“%d”,num*num);

    }

Leave an answer