Main.cc: In function ‘int main()’:
Main.cc:17:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
if(0<=a && b<=100 && 1<=x && y<=100);
^~
Main.cc:18:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
{
^
Main.cc:19:26: error: ‘A’ was not declared in this scope
float tongtien = A * X + B * Y;
^
Main.cc:19:30: error: ‘X’ was not declared in this scope
float tongtien = A * X + B * Y;
^
Main.cc:19:34: error: ‘B’ was not declared in this scope
float tongtien = A * X + B * Y;
^
Main.cc:19:38: error: ‘Y’ was not declared in this scope
float tongtien = A * X + B * Y;
^
Main.cc:19:15: warning: unused variable ‘tongtien’ [-Wunused-variable]
float tongtien = A * X + B * Y;
^~~~~~~~
Main.cc:21:75: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘double’ [-Wformat=]
printf("tong so tien can mang theo de mua het tat ca la: %d", tongtien);
^
Main.cc:10:10: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &a);
~~~~~^~~~~~~~~~
Main.cc:12:10: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &b);
~~~~~^~~~~~~~~~
Main.cc:14:10: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%f", &x);
~~~~~^~~~~~~~~~
Main.cc:16:10: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%f", &y);
~~~~~^~~~~~~~~~