This program is supposed to input a number and its square value, then tell me if right or wrong. I have some problems but I can't figure out what they are.
#include <stdio.h>
#include <math.h>
int main()
{
float P;
float q;
float r;
printf("Enter the value of p\n");
scanf("%f",p);
q= p*p;
printf("Enter the square value of %f \n",p);
scanf("%f",r);
if (r = q){
printf("You are right\n");
}
else{
printf("you are wrong\n");
}
return 0;
}
so tell me my mistakes