criyle/codenet-compile-errors huggingface dataset:
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

import javafx.geometry.Point2D;

public class Main {

  public static void main(String[] args) throws IOException {
    
    try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {

      String[] line = br.readLine().split(" ");
      Point2D p1 = new Point2D(Double.parseDouble(line[0]), Double.parseDouble(line[1]));
      Point2D p2 = new Point2D(Double.parseDouble(line[2]), Double.parseDouble(line[3]));

      System.out.printf("%.8f",p1.distance(p2));
    }
  }
}


Compiler output:
Main.java:5: error: package javafx.geometry does not exist
import javafx.geometry.Point2D;
                      ^
Main.java:14: error: cannot find symbol
      Point2D p1 = new Point2D(Double.parseDouble(line[0]), Double.parseDouble(line[1]));
      ^
  symbol:   class Point2D
  location: class Main
Main.java:14: error: cannot find symbol
      Point2D p1 = new Point2D(Double.parseDouble(line[0]), Double.parseDouble(line[1]));
                       ^
  symbol:   class Point2D
  location: class Main
Main.java:15: error: cannot find symbol
      Point2D p2 = new Point2D(Double.parseDouble(line[2]), Double.parseDouble(line[3]));
      ^
  symbol:   class Point2D
  location: class Main
Main.java:15: error: cannot find symbol
      Point2D p2 = new Point2D(Double.parseDouble(line[2]), Double.parseDouble(line[3]));
                       ^
  symbol:   class Point2D
  location: class Main
5 errors
Language: Java

import java.util.Scanner;
public class Math {
	public static void main(String[] args){
		Scanner scan=new Scanner(System.in);
		int x1=scan.nextInt();
		int y1=scan.nextInt();
		int x2=scan.nextInt();
		int y2=scan.nextInt();
		double d=Math.pow((x1-x2),2)+Math.pow((y1-y2),2);
		System.out.printf("%.8f\n",Math.sqrt(d));
		scan.close();
	}
}

Compiler output:
Main.java:2: error: class Math is public, should be declared in a file named Math.java
public class Math {
       ^
Main.java:9: error: cannot find symbol
		double d=Math.pow((x1-x2),2)+Math.pow((y1-y2),2);
		             ^
  symbol:   method pow(int,int)
  location: class Math
Main.java:9: error: cannot find symbol
		double d=Math.pow((x1-x2),2)+Math.pow((y1-y2),2);
		                                 ^
  symbol:   method pow(int,int)
  location: class Math
Main.java:10: error: cannot find symbol
		System.out.printf("%.8f\n",Math.sqrt(d));
		                               ^
  symbol:   method sqrt(double)
  location: class Math
4 errors
Language: Java



import java.util.Scanner;

public class Math {

	public static void main(String[] args){
		//
		Scanner sc = new Scanner(System.in);
		
		//最初の座標
		int firstX = sc.nextInt();
		int firstY = sc.nextInt();
		
		//二つ目の座標
		int secondX = sc.nextInt();
		int secondY = sc.nextInt();
		
		//二つの座標の距離
		double answer;
		answer = Math.sqrt(((secondX-firstX)*(secondX-firstX))+((secondY-firstY)*(secondY-firstY)));

		System.out.println(answer);
	}
}

Compiler output:
Main.java:5: error: class Math is public, should be declared in a file named Math.java
public class Math {
       ^
Main.java:21: error: cannot find symbol
		answer = Math.sqrt(((secondX-firstX)*(secondX-firstX))+((secondY-firstY)*(secondY-firstY)));
		             ^
  symbol:   method sqrt(int)
  location: class Math
2 errors
Language: Java

package Rental_DVD_Shop;

import java.util.ArrayList;

public class Main {

	public static void main(String[] args){
		
	}
}

//ビデオクラス
class Video{
	//新作値段
	int newVideoPrice = 0;
	//新作本数
	int newVideoNumber = 0;
	//準新作値段
	int normalVideoPrice = 0;
	//準新作本数
	int normalVideoNumber = 0;
	//旧作
	int oldVideoPrice = 0;
	//旧作本数
	int oldVideoNumber = 0;
	
	//コンストラクタ
	Video(int newvp,int norvp,int oldvp,int newvn,int norvn,int oldvn){
		newVideoPrice = newvp;
		normalVideoPrice = norvp;
		oldVideoPrice = oldvp;
		newVideoNumber = newvn;
		normalVideoNumber = norvn;
		oldVideoNumber = oldvn;
	}
}

//セットに関するクラス
class SetCount{
	//セット料金を適用したとき一本あたりの値段
	int setPrice = 0;
	//セット料金が適用されるときの最低本数
	int setNumber = 0;
	
	//コンストラクタ
	SetCount(int p,int n){
		//料金
		setPrice = p;
		setNumber = n;
	}
	
	//借りられたビデオの種類、本数から、最適な本数にセット料金を適応する
	public void judgeSetCase(ArrayList<Video> video){
		
		//新作の料金だけがセット料金より高い場合
		if
		
	}
	
	
}

Compiler output:
Main.java:56: error: '(' expected
		if
		  ^
Main.java:58: error: illegal start of expression
	}
	^
2 errors
Language: C

#include<stdio.h>
#include<math.h>

int main()
{
 int t,i;
 double x1,y1,x2,y2,p,q,z;

for(i=0;;i++){
              scanf("%d%d%d%d",&x1,&y1,&x2,&y2);
              p=x2-x1:
              q=y2-y1;
              z=sprt(pow(p)+pow(q));
              print("%f\n",z);
              }
 return 0;
}


Compiler output:
main.c: In function 'main':
main.c:11:22: error: expected ';' before ':' token
   11 |               p=x2-x1:
      |                      ^
      |                      ;
main.c:13:17: error: implicit declaration of function 'sprt'; did you mean 'sqrt'? [-Wimplicit-function-declaration]
   13 |               z=sprt(pow(p)+pow(q));
      |                 ^~~~
      |                 sqrt
main.c:13:22: error: too few arguments to function 'pow'
   13 |               z=sprt(pow(p)+pow(q));
      |                      ^~~
In file included from /usr/include/features.h:523,
                 from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:28,
                 from main.c:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:173:1: note: declared here
  173 | __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
      | ^~~~~~~~~~~~~~
main.c:13:29: error: too few arguments to function 'pow'
   13 |               z=sprt(pow(p)+pow(q));
      |                             ^~~
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:173:1: note: declared here
  173 | __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
      | ^~~~~~~~~~~~~~
main.c:14:15: error: implicit declaration of function 'print'; did you mean 'lrint'? [-Wimplicit-function-declaration]
   14 |               print("%f\n",z);
      |               ^~~~~
      |               lrint
Language: C

#include<stdio.h>
#include<math.h>

int main()
{
 int t,i;
 double x1,y1,x2,y2,p,q,z;

for(i=0;;i++){
              scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
              p=x2-x1:
              q=y2-y1;
              z=sprt(pow(p)+pow(q));
              print("%lf\n",z);
              }
 return 0;
}


Compiler output:
main.c: In function 'main':
main.c:11:22: error: expected ';' before ':' token
   11 |               p=x2-x1:
      |                      ^
      |                      ;
main.c:13:17: error: implicit declaration of function 'sprt'; did you mean 'sqrt'? [-Wimplicit-function-declaration]
   13 |               z=sprt(pow(p)+pow(q));
      |                 ^~~~
      |                 sqrt
main.c:13:22: error: too few arguments to function 'pow'
   13 |               z=sprt(pow(p)+pow(q));
      |                      ^~~
In file included from /usr/include/features.h:523,
                 from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:28,
                 from main.c:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:173:1: note: declared here
  173 | __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
      | ^~~~~~~~~~~~~~
main.c:13:29: error: too few arguments to function 'pow'
   13 |               z=sprt(pow(p)+pow(q));
      |                             ^~~
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:173:1: note: declared here
  173 | __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
      | ^~~~~~~~~~~~~~
main.c:14:15: error: implicit declaration of function 'print'; did you mean 'lrint'? [-Wimplicit-function-declaration]
   14 |               print("%lf\n",z);
      |               ^~~~~
      |               lrint
Language: C

#include<stdio.h>
#include<math.h>

int main()
{
 int t,i;
 double x1,y1,x2,y2,p,q,z;

for(i=0;;i++){
              scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
              p=x2-x1:
              q=y2-y1;
              z=sqrt(pow(p)+pow(q));
              print("%lf\n",z);
              }
 return 0;
}


Compiler output:
main.c: In function 'main':
main.c:11:22: error: expected ';' before ':' token
   11 |               p=x2-x1:
      |                      ^
      |                      ;
main.c:13:22: error: too few arguments to function 'pow'
   13 |               z=sqrt(pow(p)+pow(q));
      |                      ^~~
In file included from /usr/include/features.h:523,
                 from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:28,
                 from main.c:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:173:1: note: declared here
  173 | __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
      | ^~~~~~~~~~~~~~
main.c:13:29: error: too few arguments to function 'pow'
   13 |               z=sqrt(pow(p)+pow(q));
      |                             ^~~
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:173:1: note: declared here
  173 | __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
      | ^~~~~~~~~~~~~~
main.c:14:15: error: implicit declaration of function 'print'; did you mean 'lrint'? [-Wimplicit-function-declaration]
   14 |               print("%lf\n",z);
      |               ^~~~~
      |               lrint
Language: C

#include<stdio.h>
#include<math.h>

int main()
{
 int t,i;
 double x1,y1,x2,y2,p,q,z;

for(i=0;;i++){
              scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
              p=x2-x1:
              q=y2-y1;
              z=p*p+q*q
              print("%lf\n",sqrt(z));
              }
 return 0;
}


Compiler output:
main.c: In function 'main':
main.c:11:22: error: expected ';' before ':' token
   11 |               p=x2-x1:
      |                      ^
      |                      ;
main.c:13:24: error: expected ';' before 'print'
   13 |               z=p*p+q*q
      |                        ^
      |                        ;
   14 |               print("%lf\n",sqrt(z));
      |               ~~~~~
Language: C

#include<stdio.h>
#include<math.h>

int main()
{
 int t,i;
 double x1,y1,x2,y2,p,q,z;

for(i=0;;i++){
              scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
              p=x2-x1:
              q=y2-y1;
              z=p*p+q*q;
              print("%lf\n",sqrt(z));
              }
 return 0;
}


Compiler output:
main.c: In function 'main':
main.c:11:22: error: expected ';' before ':' token
   11 |               p=x2-x1:
      |                      ^
      |                      ;
main.c:14:15: error: implicit declaration of function 'print'; did you mean 'lrint'? [-Wimplicit-function-declaration]
   14 |               print("%lf\n",sqrt(z));
      |               ^~~~~
      |               lrint
Language: C

#include<stdio.h>
#include<math.h>

int main()
{
 int t,i;
 double x1,y1,x2,y2,p,q,z;

              scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
              p=x2-x1:
              q=y2-y1;
              z=p*p+q*q;
              print("%lf\n",sqrt(z));
              
 return 0;
}


Compiler output:
main.c: In function 'main':
main.c:10:22: error: expected ';' before ':' token
   10 |               p=x2-x1:
      |                      ^
      |                      ;
main.c:13:15: error: implicit declaration of function 'print'; did you mean 'lrint'? [-Wimplicit-function-declaration]
   13 |               print("%lf\n",sqrt(z));
      |               ^~~~~
      |               lrint
Language: C

#include<stdio.h>
#include<math.h>

int main()
{
 int t,i;
 double x1,y1,x2,y2,p,q,z;

              scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
              p=x2-x1;
              q=y2-y1;
              z=p*p+q*q;
              print("%lf\n",sqrt(z));
              
 return 0;
}


Compiler output:
main.c: In function 'main':
main.c:13:15: error: implicit declaration of function 'print'; did you mean 'lrint'? [-Wimplicit-function-declaration]
   13 |               print("%lf\n",sqrt(z));
      |               ^~~~~
      |               lrint
Language: C

#include <stdio.h>
#include <math.h>

int main() {
  main(){
double a,b,c,d;
scanf("%lf%lf%lf%lf",&a,&b,&c,&d);
printf("%.8lf\n",hypot(a-b,c-d));
return 0; 
}


Compiler output:
main.c: In function 'main':
main.c:5:9: error: expected ';' before '{' token
    5 |   main(){
      |         ^
      |         ;
main.c:10:1: error: expected declaration or statement at end of input
   10 | }
      | ^
Language: C

// Distance.cc
// ２点 P1(x1, y1), P2(x2, y2) の距離を求めるプログラムを作成せよ。
// 【入力】
// x1, y1, x2, y2 （実数）が空白区切りで与えられます。
// 【出力】
// P1とP2の距離を実数で１行に出力して下さい。0.0001以下の誤差があってもよいものとします。
// 【例】
// 入力１：
// 0 0 1 1
// 出力１:
// 1.41421356
#include<iostream>
#include<cmath>
using namespace std;

int main( void) {
  double x1, y1, x2, y2;

  cin >> x1 >> y1 >> x2 >> y2;

  printf( "%.8lf\n", sqrt( pow( fabs(x1-x2), 2) + pow( fabs(y1-y2),2)));

  return 0;
}



Compiler output:
main.c:12:9: fatal error: iostream: No such file or directory
   12 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C

#include<iostream>
#include<stdio.h>
#include<math.h>
using namespace std;
main(){
  int x1,y1,x2,y2,x=0,y=0;
  double kekka;
  cin >> x1 >> y1 >> x2 >> y2;
  x=x2-x1;
  y=y2-y1;
  kekka=sqrt(x*x+y*y);
  printf("%.8f\n",kekka);
}

Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C

#include <stdio.h>
#include <math.h>

int main(){

  double x1,y1,x2,y2;

  double distance;

  scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2);

  distance=sqrt(pow((x2-x1),2)?((y2-y1),2));

  printf("%f",distance);

  return 0;

}

Compiler output:
main.c: In function 'main':
main.c:12:43: error: expected ':' before ')' token
   12 |   distance=sqrt(pow((x2-x1),2)?((y2-y1),2));
      |                                           ^
      |                                           :
Language: C

#include <stdio.h>
#include <math.h>

int main(){

 int x1,y1.x2,y2;
 scanf("%lf%lf%lf%lf",&x1,&y1,&x2.&y2);
 printf("%f",sqrt((x1 - x2)*(x1 - x2) + (y1 - y2)*(y1 - y2)));

 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    6 |  int x1,y1.x2,y2;
      |           ^
main.c:7:32: error: 'x2' undeclared (first use in this function); did you mean 'x1'?
    7 |  scanf("%lf%lf%lf%lf",&x1,&y1,&x2.&y2);
      |                                ^~
      |                                x1
main.c:7:32: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:35: error: expected identifier before '&' token
    7 |  scanf("%lf%lf%lf%lf",&x1,&y1,&x2.&y2);
      |                                   ^
main.c:8:47: error: 'y2' undeclared (first use in this function); did you mean 'yn'?
    8 |  printf("%f",sqrt((x1 - x2)*(x1 - x2) + (y1 - y2)*(y1 - y2)));
      |                                               ^~
      |                                               yn
Language: C

#include <stdio.h>
#include <math.h>
 
int main(){
 
 double x1,y1,x2,y2;
 scanf("%lf%lf%lf%lf",&x1,&y1,&x2.&y2);
 printf("%f",sqrt((x1 - x2)*(x1 - x2) + (y1 - y2)*(y1 - y2)));
 
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:35: error: expected identifier before '&' token
    7 |  scanf("%lf%lf%lf%lf",&x1,&y1,&x2.&y2);
      |                                   ^
Language: C

#include<stdio.h>
#include<math.h>
int main(){

double x1,y1,x2,y2;
double a;
double x,y;

scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2);

x=|x2-x1|;
y=|y2-y1|;

a=sqrt(x*x+y*y);



return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:3: error: expected expression before '|' token
   11 | x=|x2-x1|;
      |   ^
main.c:12:3: error: expected expression before '|' token
   12 | y=|y2-y1|;
      |   ^
Language: C

#include<stdio.h>
#include<math.h>
int main(){

double x1,y1,x2,y2;

scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2);
printf("%lf\n",sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:53: error: expected ')' before ';' token
    8 | printf("%lf\n",sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
      |       ~                                             ^
      |                                                     )
main.c:10:10: error: expected ';' before '}' token
   10 | return 0;
      |          ^
      |          ;
   11 | }
      | ~
Language: C

#include<stdio.h>
#include<math.h>
int main(){
	
	int x1,x2,y1,y2;
	double kyori;
	
	scanf("%d%d%d%d",&x1,&y1,&x2,&y2);
	
	kyori=sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1));
	
	printf("%.8f\n",kyori);
	return 0:
}

Compiler output:
main.c: In function 'main':
main.c:13:17: error: expected ';' before ':' token
   13 |         return 0:
      |                 ^
      |                 ;
Language: C

#include<stdio.h>
#include<math.h>
int main()
{
	double x,y,x1x2,,y1,y2,d,distance;
	scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2);
	x=x2-x1;
	x=pow(x,2.0);
	y=y2-y1;
	y=pow(y,2.0);
	d=x+y;
	distance=sqrt(d);
	printf("%lf\n",distance);
	return 0;

	
}

Compiler output:
main.c: In function 'main':
main.c:5:25: error: expected identifier or '(' before ',' token
    5 |         double x,y,x1x2,,y1,y2,d,distance;
      |                         ^
main.c:6:34: error: 'x1' undeclared (first use in this function); did you mean 'x'?
    6 |         scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2);
      |                                  ^~
      |                                  x
main.c:6:34: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:42: error: 'x2' undeclared (first use in this function); did you mean 'x'?
    6 |         scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2);
      |                                          ^~
      |                                          x
main.c:6:46: error: 'y2' undeclared (first use in this function); did you mean 'y'?
    6 |         scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2);
      |                                              ^~
      |                                              y
main.c:11:9: error: 'd' undeclared (first use in this function)
   11 |         d=x+y;
      |         ^
main.c:12:9: error: 'distance' undeclared (first use in this function)
   12 |         distance=sqrt(d);
      |         ^~~~~~~~
Language: C

#include <stdio.h>
#include <math.h>

int main(){


  double x1,x2,y1,y2,X,Y,ru;

  scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2);

  X=x1+x2;
  X=X*X;
  Y=y1+y2;
  Y=Y*Y;

  ru=X+Y;
  printf("%f\n",sqrt(ru));
  return 0;

Compiler output:
main.c: In function 'main':
main.c:18:3: error: expected declaration or statement at end of input
   18 |   return 0;
      |   ^~~~~~
Language: C

#include<stdio.h>
#include<math.h>
int main() {
	double x1, x2, y1, y2, ans;

	scanf("%lf %lf %lf %lf", &x1, &x2, &y1, &y2);

	ans = (double)sqrt(pow(x2 - x1, 2) + pow(y2 - y1, 2));

	printf("%f", ans);

	return 0;

Compiler output:
main.c: In function 'main':
main.c:12:9: error: expected declaration or statement at end of input
   12 |         return 0;
      |         ^~~~~~
Language: C


#include<stdio.h>
#include<math.h>
int main() {
	double x1, x2, y1, y2;
	double ans;

	scanf("%lf %lf %lf %lf", &x1, &x2, &y1, &y2);

	ans = (double)sqrt(((pow(x2 - x1, 2)) + (pow(y2 - y1, 2)));

	printf("%8f", ans);

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:67: error: expected ')' before ';' token
   10 |         ans = (double)sqrt(((pow(x2 - x1, 2)) + (pow(y2 - y1, 2)));
      |                           ~                                       ^
      |                                                                   )
main.c:14:18: error: expected ';' before '}' token
   14 |         return 0;
      |                  ^
      |                  ;
   15 | }
      | ~
Language: C

#include <stdio.h>
#include <math.h>

typedef struct point{
  int x;
  int y;
} point;

double distance(point p1,point p2){
  int temp;
  temp=(p1.x-p2.x)*(p1.x-p2.x)+(p1.y-p2.y)*(p1.y-p2.y);
  return sqrt(temp);

int main(void){
  point p1,p2;
  double d;

  scanf("%d%d%d%d",&p1.x,&p1.y,&p2.x,&p2.y);
  d=distance(p1,p2);
  printf("%.5f\n",d);

  return 0;
}

Compiler output:
main.c: In function 'distance':
main.c:23:1: error: expected declaration or statement at end of input
   23 | }
      | ^
Language: C

#include <stdio.h>
#include <math.h>

int main(void){
	double x1,x2,y1,y2,dist;

	scanf("%d%d%d%d", &x1,&y1,&x2,&y2);
	dis = (x2-x1)*(x2-x1)+(y2-y1)*(y2-y1);
	printf("%f\n", sqrt(dist));

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:9: error: 'dis' undeclared (first use in this function); did you mean 'dist'?
    8 |         dis = (x2-x1)*(x2-x1)+(y2-y1)*(y2-y1);
      |         ^~~
      |         dist
main.c:8:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <math.h>

int main(void){
	double x1,x2,y1,y2,dist;

	scanf("%f%f%f%f", &x1,&y1,&x2,&y2);
	dis = (x2-x1)*(x2-x1)+(y2-y1)*(y2-y1);
	printf("%f\n", sqrt(dist));

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:9: error: 'dis' undeclared (first use in this function); did you mean 'dist'?
    8 |         dis = (x2-x1)*(x2-x1)+(y2-y1)*(y2-y1);
      |         ^~~
      |         dist
main.c:8:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include<math.h>
int main(void) {
int a,b,c,d;
double e;
scanf("%d%d%d%d",&a,&b,&c,&d);
e=(double)(a-c)*(a-c)+(b-d)*(b-d);
e=sqrt(e);
printf("%f",e;)
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:14: error: expected ')' before ';' token
    9 | printf("%f",e;)
      |       ~      ^
      |              )
main.c:9:16: error: expected ';' before 'return'
    9 | printf("%f",e;)
      |                ^
      |                ;
   10 |   return 0;
      |   ~~~~~~
Language: C

#include<iostream>
#include<cmath>
using namespace std;

void main() {
	double x1, x2, y1, y2;

	cout << "input numbers (x1 y1 x2 y2)>>";
	cin >> x1 >> y1 >> x2 >> y2;

	cout << sqrt(pow(x2 - x1, 2) + pow(y2 - y1, 2)) << endl;
}

Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C

#include <stdio.h>
#include <math.h>
int main(void)
{
 cal_distance(int x1,int x2,int y1,int y2)

  int X,Y;
  double D,d;

  X = x2 - x1;
  Y = y1 - y2;

  D = (X*X)(Y*Y);

  d = sprt(D);
  
  return (d);
}

int main(void)
{

 int  x1, x2, y1, y2;
 
 scanf("%d %d %d %d",x1, x2, y1, y2);
 
 distance = cal_distance(int x1,int x2,int y1,int y2);
 
 printf("%d"distance);

 return 0;

}

Compiler output:
main.c: In function 'main':
main.c:5:2: error: implicit declaration of function 'cal_distance' [-Wimplicit-function-declaration]
    5 |  cal_distance(int x1,int x2,int y1,int y2)
      |  ^~~~~~~~~~~~
main.c:5:15: error: expected expression before 'int'
    5 |  cal_distance(int x1,int x2,int y1,int y2)
      |               ^~~
main.c:5:43: error: expected ';' before 'int'
    5 |  cal_distance(int x1,int x2,int y1,int y2)
      |                                           ^
      |                                           ;
    6 | 
    7 |   int X,Y;
      |   ~~~                                      
main.c:10:3: error: 'X' undeclared (first use in this function)
   10 |   X = x2 - x1;
      |   ^
main.c:10:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:7: error: 'x2' undeclared (first use in this function)
   10 |   X = x2 - x1;
      |       ^~
main.c:10:12: error: 'x1' undeclared (first use in this function); did you mean 'y1'?
   10 |   X = x2 - x1;
      |            ^~
      |            y1
main.c:11:3: error: 'Y' undeclared (first use in this function)
   11 |   Y = y1 - y2;
      |   ^
main.c:11:12: error: 'y2' undeclared (first use in this function); did you mean 'yn'?
   11 |   Y = y1 - y2;
      |            ^~
      |            yn
main.c:15:7: error: implicit declaration of function 'sprt'; did you mean 'sqrt'? [-Wimplicit-function-declaration]
   15 |   d = sprt(D);
      |       ^~~~
      |       sqrt
main.c: At top level:
main.c:20:5: error: redefinition of 'main'
   20 | int main(void)
      |     ^~~~
main.c:3:5: note: previous definition of 'main' with type 'int(void)'
    3 | int main(void)
      |     ^~~~
main.c: In function 'main':
main.c:27:2: error: 'distance' undeclared (first use in this function)
   27 |  distance = cal_distance(int x1,int x2,int y1,int y2);
      |  ^~~~~~~~
main.c:27:26: error: expected expression before 'int'
   27 |  distance = cal_distance(int x1,int x2,int y1,int y2);
      |                          ^~~
main.c:29:13: error: expected ')' before 'distance'
   29 |  printf("%d"distance);
      |        ~    ^~~~~~~~
      |             )
Language: C


#include <stdio.h>
#include <math.h>
int main(void)
{
	cal_distance(int x1,int x2,int y1,int y2)

		int X,Y;
		double D,d;

		X = x2 - x1;
		Y = y1 - y2;

		D = (X*X)(Y*Y);

		d = sprt(D);
		
		return (d);
}

int main(void)
{

	int  x1, x2, y1, y2;
	
	scanf("%d %d %d %d",x1, x2, y1, y2);
	
	distance = cal_distance(int x1,int x2,int y1,int y2);
	
	printf("%d"distance);

	return 0;

}

Compiler output:
main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'cal_distance' [-Wimplicit-function-declaration]
    6 |         cal_distance(int x1,int x2,int y1,int y2)
      |         ^~~~~~~~~~~~
main.c:6:22: error: expected expression before 'int'
    6 |         cal_distance(int x1,int x2,int y1,int y2)
      |                      ^~~
main.c:6:50: error: expected ';' before 'int'
    6 |         cal_distance(int x1,int x2,int y1,int y2)
      |                                                  ^
      |                                                  ;
    7 | 
    8 |                 int X,Y;
      |                 ~~~                               
main.c:11:17: error: 'X' undeclared (first use in this function)
   11 |                 X = x2 - x1;
      |                 ^
main.c:11:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:21: error: 'x2' undeclared (first use in this function)
   11 |                 X = x2 - x1;
      |                     ^~
main.c:11:26: error: 'x1' undeclared (first use in this function); did you mean 'y1'?
   11 |                 X = x2 - x1;
      |                          ^~
      |                          y1
main.c:12:17: error: 'Y' undeclared (first use in this function)
   12 |                 Y = y1 - y2;
      |                 ^
main.c:12:26: error: 'y2' undeclared (first use in this function); did you mean 'yn'?
   12 |                 Y = y1 - y2;
      |                          ^~
      |                          yn
main.c:16:21: error: implicit declaration of function 'sprt'; did you mean 'sqrt'? [-Wimplicit-function-declaration]
   16 |                 d = sprt(D);
      |                     ^~~~
      |                     sqrt
main.c: At top level:
main.c:21:5: error: redefinition of 'main'
   21 | int main(void)
      |     ^~~~
main.c:4:5: note: previous definition of 'main' with type 'int(void)'
    4 | int main(void)
      |     ^~~~
main.c: In function 'main':
main.c:28:9: error: 'distance' undeclared (first use in this function)
   28 |         distance = cal_distance(int x1,int x2,int y1,int y2);
      |         ^~~~~~~~
main.c:28:33: error: expected expression before 'int'
   28 |         distance = cal_distance(int x1,int x2,int y1,int y2);
      |                                 ^~~
main.c:30:20: error: expected ')' before 'distance'
   30 |         printf("%d"distance);
      |               ~    ^~~~~~~~
      |                    )
Language: C

#include <stdido.h>
#include <math.h>

#define sqr(x) ((x) * (x))

typedef struct point {
  double x;
  double y;
}Point;

int main(void)
{
  Point p1, p2;

  scanf("%if %lf %lf %lf", &p1.x, &p1.y, &p2.x, &p2.y);

  printf("%d\n", sqrt(sqr(p2.x - p1.x) + sqr(p2.y - p1.y)));

  return 0;
}

Compiler output:
main.c:1:10: fatal error: stdido.h: No such file or directory
    1 | #include <stdido.h>
      |          ^~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
#include<math.h>

int main()
{
		double x1, y1, x2, y2;
		scanf("%lf %lf %lf %lf", &x1, &y1, &x2, &y2);
		printf("%f", sqrt((x1-x2)*(x1-x2), (y1-y2)*(y1-y2));
		return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:30: error: too many arguments to function 'sqrt'
    8 |                 printf("%f", sqrt((x1-x2)*(x1-x2), (y1-y2)*(y1-y2));
      |                              ^~~~
In file included from /usr/include/features.h:523,
                 from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:28,
                 from main.c:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:176:1: note: declared here
  176 | __MATHCALL (sqrt,, (_Mdouble_ __x));
      | ^~~~~~~~~~
main.c:8:68: error: expected ')' before ';' token
    8 |                 printf("%f", sqrt((x1-x2)*(x1-x2), (y1-y2)*(y1-y2));
      |                       ~                                            ^
      |                                                                    )
main.c:9:26: error: expected ';' before '}' token
    9 |                 return 0;
      |                          ^
      |                          ;
   10 | }
      | ~
Language: C

#include<stdio.h>
#include<math.h>

int main()
{
		double x1, y1, x2, y2;
		scanf("%lf %lf %lf %lf", &x1, &y1, &x2, &y2);
		printf("%f", sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
		return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:67: error: expected ')' before ';' token
    8 |                 printf("%f", sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
      |                       ~                                           ^
      |                                                                   )
main.c:9:26: error: expected ';' before '}' token
    9 |                 return 0;
      |                          ^
      |                          ;
   10 | }
      | ~
Language: C

#include<iostream>
#include<math.h>
using namespace std;
int main(){

    double x1,y1,x2,y2;
    scanf("%f%f%f%f"&x1,&y1,&x2,&y2);
    printf("%6f\n",sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)));
    return 0;
}

Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
#include<math.h>
using namespace std;
int main(){

    double x1,y1,x2,y2;
    scanf("%f%f%f%f"&x1,&y1,&x2,&y2);
    printf("%6f\n",sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)));
    return 0;
}

Compiler output:
main.c:3:1: error: unknown type name 'using'
    3 | using namespace std;
      | ^~~~~
main.c:3:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
    3 | using namespace std;
      |                 ^~~
main.c: In function 'main':
main.c:7:21: error: invalid operands to binary & (have 'char *' and 'double')
    7 |     scanf("%f%f%f%f"&x1,&y1,&x2,&y2);
      |           ~~~~~~~~~~^
      |           |
      |           char *
Language: C

#include<iostream>
#include<math.h>
using namespace std;
int main(){

    double x1,y1,x2,y2;
    cin >>x1>>y1>>x2>>y2;
    cout.precision(10);
    cout <<(double)sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)) <<endl;
    return 0;
}

Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C

#include<iostream>
#include<math.h>
using namespace std;
int main(){

    double x1,y1,x2,y2;
    cin >>x1>>y1>>x2>>y2;
    cout.precision(9);
    cout <<(double)sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)) <<endl;
    return 0;
}

Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C

#include <stdio.h>
#include <math.h>
int main(void){
double x1,x2,y1,y2,XX,YY;
scanf(%lf %lf %lf %lf,&x1,&y1,&x2,&y2);
 printf("%f\n", sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)));
     
    return (0);
     
}

Compiler output:
main.c: In function 'main':
main.c:5:7: error: expected expression before '%' token
    5 | scanf(%lf %lf %lf %lf,&x1,&y1,&x2,&y2);
      |       ^
Language: C

#include<stdio.h>
#include<math.h>
using namespace std;
int main(){
	double x1, x2, y1, y2, p1 , p2 , x ;
	scanf_s("%d, %d, %d, %d", x1, y1, x2, y2);
	p1 = x2 - x1;
	p2 = y2 - y1;
	x = p1*p1 + p2*p2;
	x = sqrt(x);
	printf("%.8lf\n ", x);
	return 0;
}

Compiler output:
main.c:3:1: error: unknown type name 'using'
    3 | using namespace std;
      | ^~~~~
main.c:3:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
    3 | using namespace std;
      |                 ^~~
main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    6 |         scanf_s("%d, %d, %d, %d", x1, y1, x2, y2);
      |         ^~~~~~~
      |         scanf
Language: C

#include<stdio.h>
#include<math.h>
using namespace std;
int main(){
	double x1, x2, y1, y2, p1 , p2 , x ;
	scanf_s("%lf,%lf,%lf,%lf", &x1, &y1, &x2, y2);
	p1 = x2 - x1;
	p2 = y2 - y1;
	x = p1*p1 + p2*p2;
	x = sqrt(x);
	printf("%.8lf\n ", x);
	return 0;
}

Compiler output:
main.c:3:1: error: unknown type name 'using'
    3 | using namespace std;
      | ^~~~~
main.c:3:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
    3 | using namespace std;
      |                 ^~~
main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    6 |         scanf_s("%lf,%lf,%lf,%lf", &x1, &y1, &x2, y2);
      |         ^~~~~~~
      |         scanf
Language: C

#include<stdio.h>
#include<math.h>
using namespace std;
int main(){
	double x1, x2, y1, y2, p1 , p2 , x ;
	scanf_s("%lf,%lf,%lf,%lf", &x1, &y1, &x2, &y2);
	p1 = x2 - x1;
	p2 = y2 - y1;
	x = p1*p1 + p2*p2;
	x = sqrt(x);
	printf("%.8lf\n ", x);
	return 0;
}

Compiler output:
main.c:3:1: error: unknown type name 'using'
    3 | using namespace std;
      | ^~~~~
main.c:3:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
    3 | using namespace std;
      |                 ^~~
main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    6 |         scanf_s("%lf,%lf,%lf,%lf", &x1, &y1, &x2, &y2);
      |         ^~~~~~~
      |         scanf
Language: C

#include <stdio.h>
#include <math.h>
int main(void)
{
  double x1,x2,y1,y2,z;
 z = pow((x1-x2),2.0)+pow((y1-y2),2.0)
  scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
   printf("%f\n",sqrt(z));
  return(0);
}
 

Compiler output:
main.c: In function 'main':
main.c:6:39: error: expected ';' before 'scanf'
    6 |  z = pow((x1-x2),2.0)+pow((y1-y2),2.0)
      |                                       ^
      |                                       ;
    7 |   scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
      |   ~~~~~
Language: C

#include <stdio.h>
#include <math.h>
int main(void)
{
  double x1,x2,y1,y2,z;
  scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
     z = pow((x1-x2),2.0)+pow((y1-y2),2.0)
   printf("%f\n",sqrt(z));
  return0;
}
 

Compiler output:
main.c: In function 'main':
main.c:7:43: error: expected ';' before 'printf'
    7 |      z = pow((x1-x2),2.0)+pow((y1-y2),2.0)
      |                                           ^
      |                                           ;
    8 |    printf("%f\n",sqrt(z));
      |    ~~~~~~                                  
main.c:9:3: error: 'return0' undeclared (first use in this function)
    9 |   return0;
      |   ^~~~~~~
main.c:9:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <math.h>
int main(void){
  double x1,x2,y1,y2,z;
  scanf("%lf %lf %lf %lf",&x1,&x2,&y1,&y2);
     z = pow((x1-x2),2.0)+pow((y1-y2),2.0)
   printf("%f\n",sqrt(z));
  return0;
}

Compiler output:
main.c: In function 'main':
main.c:6:43: error: expected ';' before 'printf'
    6 |      z = pow((x1-x2),2.0)+pow((y1-y2),2.0)
      |                                           ^
      |                                           ;
    7 |    printf("%f\n",sqrt(z));
      |    ~~~~~~                                  
main.c:8:3: error: 'return0' undeclared (first use in this function)
    8 |   return0;
      |   ^~~~~~~
main.c:8:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <math.h>
int main(void){
  double x1,x2,y1,y2,z;
  scanf("%lf %lf %lf %lf",&x1,&x2,&y1,&y2);
     z = pow((x1-x2),2.0)+pow((y1-y2),2.0)
   printf("%f\n",sqrt(z));
  return 0;
}
 

Compiler output:
main.c: In function 'main':
main.c:6:43: error: expected ';' before 'printf'
    6 |      z = pow((x1-x2),2.0)+pow((y1-y2),2.0)
      |                                           ^
      |                                           ;
    7 |    printf("%f\n",sqrt(z));
      |    ~~~~~~
Language: C

#include <stdio.h>
#include <math.h>
int main(void){
  double x1,x2,y1,y2,z;
  scanf("%lf %lf %lf %lf",&x1,&x2,&y1,&y2);
     z = pow(x1-x2,2.0)+pow(y1-y2,2.0)
   printf("%lf\n",sqrt(z));
  return 0;
}
 

Compiler output:
main.c: In function 'main':
main.c:6:39: error: expected ';' before 'printf'
    6 |      z = pow(x1-x2,2.0)+pow(y1-y2,2.0)
      |                                       ^
      |                                       ;
    7 |    printf("%lf\n",sqrt(z));
      |    ~~~~~~
Language: C

#include <stdio.h>
#include <math.h>
int main(void){
  double x1,x2,y1,y2,z;
  scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2);
     z = pow(x1-x2,2.0)+pow(y1-y2,2.0)
   printf("%lf\n",sqrt(z));
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:39: error: expected ';' before 'printf'
    6 |      z = pow(x1-x2,2.0)+pow(y1-y2,2.0)
      |                                       ^
      |                                       ;
    7 |    printf("%lf\n",sqrt(z));
      |    ~~~~~~
Language: C

#include <stdio.h>
#include <math.h>
int main(void){
  double x1,x2,y1,y2;
  scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2);
   printf("%lf\n",sqrt(pow(x2-x1,2.0)+pow(y2-y1,2.0));
  return 0;
}
 

Compiler output:
main.c: In function 'main':
main.c:6:54: error: expected ')' before ';' token
    6 |    printf("%lf\n",sqrt(pow(x2-x1,2.0)+pow(y2-y1,2.0));
      |          ~                                           ^
      |                                                      )
main.c:7:12: error: expected ';' before '}' token
    7 |   return 0;
      |            ^
      |            ;
    8 | }
      | ~
Language: C

#include <stdio.h>
#include <math.h>
int main(void){
  double x1,x2,y1,y2,d;
  scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2);
    d=sqrt(pow(x2-x1,2.0)+pow(y2-y1,2.0)
   printf("%lf\n",d);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:41: error: expected ')' before 'printf'
    6 |     d=sqrt(pow(x2-x1,2.0)+pow(y2-y1,2.0)
      |           ~                             ^
      |                                         )
    7 |    printf("%lf\n",d);
      |    ~~~~~~                                
main.c:8:12: error: expected ';' before '}' token
    8 |   return 0;
      |            ^
      |            ;
    9 | }
      | ~
Language: C

#include <stdio.h>
#include <math.h>
int main(void){
  double x1,x2,y1,y2,d;
  scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2);
    d=sqrt(pow(x2-x1,2)+pow(y2-y1,2)
   printf("%lf\n",d);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:37: error: expected ')' before 'printf'
    6 |     d=sqrt(pow(x2-x1,2)+pow(y2-y1,2)
      |           ~                         ^
      |                                     )
    7 |    printf("%lf\n",d);
      |    ~~~~~~                            
main.c:8:12: error: expected ';' before '}' token
    8 |   return 0;
      |            ^
      |            ;
    9 | }
      | ~
Language: C

#include <stdio.h>
#include <math.h>
int main(void){
  double x1,x2,y1,y2,d;
  scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2);
    d=sqrt(pow(x2-x1,2)+pow(y2-y1,2)
   printf("%.8f\n",d);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:37: error: expected ')' before 'printf'
    6 |     d=sqrt(pow(x2-x1,2)+pow(y2-y1,2)
      |           ~                         ^
      |                                     )
    7 |    printf("%.8f\n",d);
      |    ~~~~~~                            
main.c:8:12: error: expected ';' before '}' token
    8 |   return 0;
      |            ^
      |            ;
    9 | }
      | ~
Language: C

#include <stdio.h>
#include <math.h>
int main(void){
  double x1,x2,y1,y2,d;
  scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2);
    d=sqrt(pow(x2-x1,2)+pow(y2-y1,2))
   printf("%.8f\n",d);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:38: error: expected ';' before 'printf'
    6 |     d=sqrt(pow(x2-x1,2)+pow(y2-y1,2))
      |                                      ^
      |                                      ;
    7 |    printf("%.8f\n",d);
      |    ~~~~~~
Language: C

#include<stdio.h>
#include<math.h>
int main(void)
{
  int x1,x2,y1,y2,d;
  scanf("%d %d %d %d",x1,x2,y1,y2);
  d=(x1-y1)*(x1-y1)+(x2-y2)*(x2-y2);
  
  printf("sqrt(%.lf)",d);
  return EXIT_SUCCESS;
}



Compiler output:
main.c: In function 'main':
main.c:10:10: error: 'EXIT_SUCCESS' undeclared (first use in this function)
   10 |   return EXIT_SUCCESS;
      |          ^~~~~~~~~~~~
main.c:3:1: note: 'EXIT_SUCCESS' is defined in header '<stdlib.h>'; this is probably fixable by adding '#include <stdlib.h>'
    2 | #include<math.h>
  +++ |+#include <stdlib.h>
    3 | int main(void)
main.c:10:10: note: each undeclared identifier is reported only once for each function it appears in
   10 |   return EXIT_SUCCESS;
      |          ^~~~~~~~~~~~
Language: C

#include <stdio.h>
#include <math.h>
int main(void){
    int x1, y1, x2, y2;
    scanf("%d %d %d %d", &x1, &y1, &x2, &y2);
    X = pow((x2 - x1), 2);
    Y = pow((y2 - y1), 2);
    printf("%.8f\n", sqrt(X + Y));
    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:6:5: error: 'X' undeclared (first use in this function)
    6 |     X = pow((x2 - x1), 2);
      |     ^
main.c:6:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:5: error: 'Y' undeclared (first use in this function)
    7 |     Y = pow((y2 - y1), 2);
      |     ^
Language: C

#include <stdio.h>
#include<math.h>
int main(void){
    int x1,y1,x2,y2;
    scanf("%d %d %d %d",&x1,&y1,&x2,&y2);
    printf("%.8f\n",(double)sqrt((x2-x1)^2+(y2-y1)^2);
    return 0;
    
}



Compiler output:
main.c: In function 'main':
main.c:6:54: error: expected ')' before ';' token
    6 |     printf("%.8f\n",(double)sqrt((x2-x1)^2+(y2-y1)^2);
      |           ~                                          ^
      |                                                      )
main.c:7:14: error: expected ';' before '}' token
    7 |     return 0;
      |              ^
      |              ;
    8 | 
    9 | }
      | ~
Language: C

#include <stdio.h>
#include<math.h>
int main(void){
    
    int x1, y1, x2, y2;
    scanf("%d %d %d %d", &x1, &y1 &x2, &y2);
    
    printf("%.8f\n", sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
    
    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:6:35: error: invalid operands to binary & (have 'int *' and 'int')
    6 |     scanf("%d %d %d %d", &x1, &y1 &x2, &y2);
      |                               ~~~ ^
      |                               |
      |                               int *
main.c:8:59: error: expected ')' before ';' token
    8 |     printf("%.8f\n", sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
      |           ~                                               ^
      |                                                           )
main.c:10:14: error: expected ';' before '}' token
   10 |     return 0;
      |              ^
      |              ;
   11 | }
      | ~
Language: C

#include <stdio.h>
#include<math.h>
int main(void){
    
    double x1, y1, x2, y2;
    scanf("%d %d %d %d", &x1, &y1 &x2, &y2);
    
    printf("%.8f\n", sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
    
    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:6:35: error: invalid operands to binary & (have 'double *' and 'double')
    6 |     scanf("%d %d %d %d", &x1, &y1 &x2, &y2);
      |                               ~~~ ^
      |                               |
      |                               double *
main.c:8:59: error: expected ')' before ';' token
    8 |     printf("%.8f\n", sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
      |           ~                                               ^
      |                                                           )
main.c:10:14: error: expected ';' before '}' token
   10 |     return 0;
      |              ^
      |              ;
   11 | }
      | ~
Language: C

#include <stdio.h>
#include <math.h>
int main(void){
   double x1,y1,x2,y2;
   scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2);
   printf("%.8lf",SQR((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)));
   return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:19: error: implicit declaration of function 'SQR' [-Wimplicit-function-declaration]
    6 |    printf("%.8lf",SQR((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)));
      |                   ^~~
Language: C

#include<iostream>
#include<math.h>

using namespace std;

int main(){

 double x1, y1, x2, y2;
 double x, y, distance;

 x = x1 + x2;
 y = y1 + y2;

 distance = sqrt(x ** x + y ** y);

 cout << distance;

 return 0;
}

Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C

#include(math.h)
int main(void)
{
  double x1,x2,y1,y2;
  scanf("%lf %lf %lf %lf",x1,y1,x2,y2); 

  printf("%lf",sqrt(pow(x1-x2)+pow(y1-y2)));
  return 0;
}

Compiler output:
main.c:1:9: error: #include expects "FILENAME" or <FILENAME>
    1 | #include(math.h)
      |         ^
main.c: In function 'main':
main.c:5:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    5 |   scanf("%lf %lf %lf %lf",x1,y1,x2,y2);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #include(math.h)
main.c:5:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    5 |   scanf("%lf %lf %lf %lf",x1,y1,x2,y2);
      |   ^~~~~
main.c:5:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:7:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    7 |   printf("%lf",sqrt(pow(x1-x2)+pow(y1-y2)));
      |   ^~~~~~
main.c:7:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:7:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:16: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
    7 |   printf("%lf",sqrt(pow(x1-x2)+pow(y1-y2)));
      |                ^~~~
main.c:1:1: note: include '<math.h>' or provide a declaration of 'sqrt'
  +++ |+#include <math.h>
    1 | #include(math.h)
main.c:7:16: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
    7 |   printf("%lf",sqrt(pow(x1-x2)+pow(y1-y2)));
      |                ^~~~
main.c:7:16: note: include '<math.h>' or provide a declaration of 'sqrt'
main.c:7:21: error: implicit declaration of function 'pow' [-Wimplicit-function-declaration]
    7 |   printf("%lf",sqrt(pow(x1-x2)+pow(y1-y2)));
      |                     ^~~
main.c:7:21: note: include '<math.h>' or provide a declaration of 'pow'
main.c:7:21: warning: incompatible implicit declaration of built-in function 'pow' [-Wbuiltin-declaration-mismatch]
main.c:7:21: note: include '<math.h>' or provide a declaration of 'pow'
main.c:7:21: error: too few arguments to function 'pow'
main.c:7:32: error: too few arguments to function 'pow'
    7 |   printf("%lf",sqrt(pow(x1-x2)+pow(y1-y2)));
      |                                ^~~