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

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

int main(void){
  int n,score[1000],i,sum;
  double aver,hensa[1000],hsqsum,var,sdvi;

  while(1){
    scanf("%d",&n);
    if(n==0)  break;
    
    sum=0;
    for(i=0;i<n;i++){
      scanf("%d",&score[i]);  sum+=score[i];
    }
    aver=(double)sum/n;
    hsqsum=0;
    for(i=0;i<n;i++){
      hensa[i]=score[i]-aver;
      hsqsum+=(hensa[i]*hensa[i]);
    }
    var=hsqnum/n;
    sdvi=sqrt(var);

    printf("%f\n",sdvi);
  }

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:22:9: error: 'hsqnum' undeclared (first use in this function); did you mean 'hsqsum'?
   22 |     var=hsqnum/n;
      |         ^~~~~~
      |         hsqsum
main.c:22: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  n,s[1000]i,j;
	double	a,m=0,M=0,N,a,a2;
	
	
	
	while(n == 0)
	{ 
		scanf("%d",n);

		for(i=0;i<n;i++)
		{
			scanf("%d",&s[i]);
		}

		for(i=0;i<n;i++)
		{
			m = m + s[i];
		}


		m = m/n;

		for(i=0;i<n;i++)
		{
			N =pow(s[i]-m,2);
			
			M = M + N;
		}

		a2 = M/n;
		
		a = sqrt(a2);

	}

		
	return 0;
		
}

Compiler output:
main.c: In function 'main':
main.c:8:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'i'
    8 |         int  n,s[1000]i,j;
      |                       ^
main.c:9:29: error: redeclaration of 'a' with no linkage
    9 |         double  a,m=0,M=0,N,a,a2;
      |                             ^
main.c:9:17: note: previous declaration of 'a' with type 'double'
    9 |         double  a,m=0,M=0,N,a,a2;
      |                 ^
main.c:17:21: error: 'i' undeclared (first use in this function)
   17 |                 for(i=0;i<n;i++)
      |                     ^
main.c:17:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:19:37: error: 's' undeclared (first use in this function)
   19 |                         scanf("%d",&s[i]);
      |                                     ^
Language: C

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

int main(void)
{

	int  n,s[1000]i,j;
	double	m=0,M=0,N,a,a2;
	
	
	
	while(n == 0)
	{ 
		scanf("%d",n);

		for(i=0;i<n;i++)
		{
			scanf("%d",&s[i]);
		}

		for(i=0;i<n;i++)
		{
			m = m + s[i];
		}


		m = m/n;

		for(i=0;i<n;i++)
		{
			N = pow(s[i]-m,2);
			
			M = M + N;
		}

		a2 = M/n;
		
		a = sqrt(a2);

	}

		
	return 0;
		
}

Compiler output:
main.c: In function 'main':
main.c:8:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'i'
    8 |         int  n,s[1000]i,j;
      |                       ^
main.c:17:21: error: 'i' undeclared (first use in this function)
   17 |                 for(i=0;i<n;i++)
      |                     ^
main.c:17:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:19:37: error: 's' undeclared (first use in this function)
   19 |                         scanf("%d",&s[i]);
      |                                     ^
Language: C

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

int main(void)
{
	int stu_num;
	while (1) {
		scanf("%d", &stu_num);
		if (stu_num == 0) {
			break;
		}

		int stu_pnt[stu_num];
		double pnt_ave = 0;
		for (int i = 0; i < stu_num; ++i) {
			scanf("%d", &stu_pnt[i]);
			pnt_ave += stu_pnt[i];
		}
		pnt_ave /= stu_num * 1.0;

		double ans = 0;
		for (int i = 0; i < stu_num; ++i) {
			ans += pow((stu_pnt[i] - pnt_ave), 2);
		}
		ans /= stu_num;
		printf("%lf\n", sqrt(ans));
	}

	return 0;
}

Compiler output:
/usr/bin/ld: /tmp/ccRQ5vvT.o: in function `main':
main.c:(.text+0x151): undefined reference to `pow'
/usr/bin/ld: main.c:(.text+0x192): undefined reference to `sqrt'
collect2: error: ld returned 1 exit status
Language: C

#include<stdio.h>
#include<math.h>
int main()
{
	int n;
	double s[1000], sum = 0, ans = 0;
	while (1)
	{
		scanf("%d",&n);
		if (n == 0)break;
		for (int i=0; i < n; i++)
		{
			scanf("%f", &s[i]);
			sum += s[i];
		}
		for (int i = 0; i < n; i++)
		{
			ans = ans + (s[i] - sum / n)*(s[i] - sum / n);
		}
		printf("%f\n",sqrt(ans/n));
	}
	return 0;
}

Compiler output:
/usr/bin/ld: /tmp/ccmVgr8M.o: in function `main':
main.c:(.text+0x135): undefined reference to `sqrt'
collect2: error: ld returned 1 exit status
Language: C

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

int main()
{
	long long int n, s[1000];
	double sum = 0, ans = 0;
	while (1)
	{
		scanf("%lli",&n);
		if (n == 0)break;
		for (int i=0; i < n; i++)
		{
			scanf("%lli", &s[i]);
			sum = sum + s[i];
		}
		for (int j = 0; j < n; j++)
		{
			ans = ans + (s[j] - sum/n)*(s[j] - sum/n);
		}
		printf("%f\n",sqrt(ans/n));
	}
	return 0;
}

Compiler output:
/usr/bin/ld: /tmp/ccSujj3E.o: in function `main':
main.c:(.text+0x167): undefined reference to `sqrt'
collect2: error: ld returned 1 exit status
Language: C

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

int main()
{
	long long int n, s[1000];
	double sum = 0, ans = 0;
	while (1)
	{
		scanf("%lli", &n);
		if (n == 0)break;
		for (int i = 0; i < n; i++)
		{
			scanf("%lli", &s[i]);
			sum = sum + s[i];
		}
		for (int j = 0; j < n; j++)
		{
			ans = ans + (s[j] - sum / n)*(s[j] - sum / n);
		}
		printf("%.8f\n", sqrt(ans / n));
	}
	return 0;
}

Compiler output:
/usr/bin/ld: /tmp/ccyICfHR.o: in function `main':
main.c:(.text+0x167): undefined reference to `sqrt'
collect2: error: ld returned 1 exit status
Language: C

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

int main()
{
	long long int n, s[1001];
	double sum = 0, ans = 0;
	while (1)
	{
		scanf("%lli", &n);
		if (n == 0)break;
		for (int i = 0; i < n; i++)
		{
			scanf("%lli", &s[i]);
			sum = sum + s[i];
		}
		for (int j = 0; j < n; j++)
		{
			ans = ans + (s[j] - sum / n)*(s[j] - sum / n);
		}
		printf("%.8f\n", sqrt(ans / n));
	}
	return 0;
}

Compiler output:
/usr/bin/ld: /tmp/cct4NBPB.o: in function `main':
main.c:(.text+0x167): undefined reference to `sqrt'
collect2: error: ld returned 1 exit status
Language: C

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

int main(void)
{
	long long int n, s[1000];
	double sum = 0, ans = 0;
	while (1)
	{
		scanf("%lli", &n);
		if (n == 0)break;
		for (int i = 0; i < n; i++)
		{
			scanf("%lli", &s[i]);
			sum = sum + s[i];
		}
		for (int j = 0; j < n; j++)
		{
			ans = ans + (s[j] - sum / n)*(s[j] - sum / n);
		}
		printf("%.8f\n", sqrt(ans / n));
	}
	return 0;
}

Compiler output:
/usr/bin/ld: /tmp/ccOzugUP.o: in function `main':
main.c:(.text+0x167): undefined reference to `sqrt'
collect2: error: ld returned 1 exit status
Language: C

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

int main(void)
{
	long long int n, s[1000];
	double sum = 0, ans = 0;
	while (1)
	{
		sum = 0;
		ans = 0;
		scanf("%lli", &n);
		if (n == 0)break;
		for (int i = 0; i < n; i++)
		{
			scanf("%lli", &s[i]);
			sum = sum + s[i];
		}
		for (int j = 0; j < n; j++)
		{
			ans = ans + (s[j] - sum / n)*(s[j] - sum / n);
			s[j] = 0;
		}
		printf("%.8f\n", sqrt(ans / n));
	}
	return 0;
}

Compiler output:
/usr/bin/ld: /tmp/ccgyxKRX.o: in function `main':
main.c:(.text+0x18d): undefined reference to `sqrt'
collect2: error: ld returned 1 exit status
Language: C

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

int main(void)
{
	long long int n, s[1000];
	double sum, ans;
	while (1)
	{
		sum = 0;
		ans = 0;
		scanf("%lli", &n);
		if (n == 0)break;
		for (int i = 0; i < n; i++)
		{
			scanf("%lli", &s[i]);
			sum = sum + s[i];
		}
		for (int j = 0; j < n; j++)
		{
			ans = ans + (s[j] - sum / n)*(s[j] - sum / n);
			s[j] = 0;
		}
		printf("%.9f\n", sqrt(ans / n));
	}
	return 0;
}

Compiler output:
/usr/bin/ld: /tmp/ccA2buSu.o: in function `main':
main.c:(.text+0x17b): undefined reference to `sqrt'
collect2: error: ld returned 1 exit status
Language: C

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

int main(void)
{
	long long int n, s[1000];
	double sum, ans;
	while (1)
	{
		sum = 0;
		ans = 0;
		scanf("%lli", &n);
		if (n == 0)break;
		for (int i = 0; i < n; i++)
		{
			scanf("%lli", &s[i]);
			sum = sum + s[i];
		}
		for (int j = 0; j < n; j++)
		{
			ans = ans + (s[j] - sum / n)*(s[j] - sum / n);
			s[j] = 0;
		}
		printf("%f\n", sqrt(ans / n));
	}
	return 0;
}

Compiler output:
/usr/bin/ld: /tmp/ccTCTAOT.o: in function `main':
main.c:(.text+0x17b): undefined reference to `sqrt'
collect2: error: ld returned 1 exit status
Language: C

#include <stdio.h>
#include <math.h>
#define MAX (1000)

int main(void) {
    int i, n;
    double s[MAX];
    while(scanf("%d", &n), n) {
        sum = sd = 0;
        for(i = 0; i < n; i++) {
            scanf("%lf", &s[i]);
            sum += s[i];
        }
        avg = sum / n;
        for(i = 0; i < n; i++) {
            sd += pow((s[i] - avg), 2);
        }
        printf("%f\n", sqrt(sd / n));
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:9: error: 'sum' undeclared (first use in this function)
    9 |         sum = sd = 0;
      |         ^~~
main.c:9:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:15: error: 'sd' undeclared (first use in this function); did you mean 's'?
    9 |         sum = sd = 0;
      |               ^~
      |               s
main.c:14:9: error: 'avg' undeclared (first use in this function)
   14 |         avg = sum / n;
      |         ^~~
Language: C

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

int main(void){
int n,i,j;
double s[1005],S,m,sgm;
while(1){
scanf("%d",&n);
if(n==0){break;}
S=0;
for(i=0;i<n;i++){
scanf("%lf",&s[i]);
S=S+s[i];
}
m=S/(double)n;
sgm=0;
for(i-0;i<n;i++){
sgm=sgm+(s[i]-m)*(s[i]-m)
}
printf("%d\n",sqrt(sgm/(double)n);

}
return(0);
}

Compiler output:
main.c: In function 'main':
main.c:18:26: error: expected ';' before '}' token
   18 | sgm=sgm+(s[i]-m)*(s[i]-m)
      |                          ^
      |                          ;
   19 | }
      | ~                         
main.c:20:34: error: expected ')' before ';' token
   20 | printf("%d\n",sqrt(sgm/(double)n);
      |       ~                          ^
      |                                  )
main.c:20:35: error: expected ';' before '}' token
   20 | printf("%d\n",sqrt(sgm/(double)n);
      |                                   ^
      |                                   ;
   21 | 
   22 | }
      | ~
Language: C

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

int main(void){
int n,i,j;
double s[1005],S,m,sgm;
while(1){
scanf("%d",&n);
if(n==0){break;}
S=0;
for(i=0;i<n;i++){
scanf("%lf",&s[i]);
S=S+s[i];
}
m=S/(double)n;
sgm=0;
for(i-0;i<n;i++){
sgm=sgm+(s[i]-m)*(s[i]-m);
}
printf("%d\n",sqrt(sgm/(double)n);

}
return(0);
}

Compiler output:
main.c: In function 'main':
main.c:20:34: error: expected ')' before ';' token
   20 | printf("%d\n",sqrt(sgm/(double)n);
      |       ~                          ^
      |                                  )
main.c:20:35: error: expected ';' before '}' token
   20 | printf("%d\n",sqrt(sgm/(double)n);
      |                                   ^
      |                                   ;
   21 | 
   22 | }
      | ~
Language: C

#include <stdio.h>
int main (void)

{
	int n, s[1010], sum, j;
	double ave; dev[1010]


	while(1){
		scanf("%d", &n);
		if(n==0)break;
		
		sum=0;
		for(i=0; i<n; i++){
			scanf("%d", &s[i]);
			sum += s[i];
		}

		ave = (double)sum / (double)n;
		bun=0.0;

		for(i=0; i<n; i++)
			bun += pow(s[i]-ave,2);

			dev[j++] = sqrt(bun/(double)n);
	}

	for(i=0; i<j; i++){
		printf("%f\n",dev[i]);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:21: error: 'dev' undeclared (first use in this function)
    6 |         double ave; dev[1010]
      |                     ^~~
main.c:6:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:30: error: expected ';' before 'while'
    6 |         double ave; dev[1010]
      |                              ^
      |                              ;
......
    9 |         while(1){
      |         ~~~~~
Language: C

#include <stdio.h>

int main(void){

    int num,i,line[1000];
    double sum,sum1;

???    for(;sum=0.0,sum1=0.0,scanf("%d",&num),num;){
        for(i=0;i<num;sum+=line[i],i++)
            scanf("%d",&line[i]);
        sum/=num;
        for(i=0;i<num;i++)
            sum1+=pow((line[i]-sum),2);
        sum1/=num;

        printf("%f\n",sqrt(sum1));

    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:1: error: expected expression before '?' token
    8 | ???    for(;sum=0.0,sum1=0.0,scanf("%d",&num),num;){
      | ^
Language: C

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

int main()
{
    int n, i
    int sum = 0;
    int s[1001];
    double m;
    double a = 0.0;
    
    while(1){
        
        scanf("%d", &n);
        if(n==0) break;
        
        for(i=0; i<n; i++){
            scanf("%d", &s[i]);
            sum += s[i];
        }
        m = sum / n;
        for(i=0; i<n; i++) a += (s[i]-m) * (s[i]-m);
        a = a / n;
        
        printf("%f\n", sqrt(a));
        
        sum = 0.0;
        a = 0.0;
    }
    
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
    7 |     int sum = 0;
      |     ^~~
main.c:17:13: error: 'i' undeclared (first use in this function)
   17 |         for(i=0; i<n; i++){
      |             ^
main.c:17:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:19:13: error: 'sum' undeclared (first use in this function)
   19 |             sum += s[i];
      |             ^~~
Language: C

#include<stdio.h>
#include<math.h>
int main(){
 
  int i,n,score[1001],sum;
  double ave,sig,v;
 
   
  while(1){
 
    scanf("%d", &n );
    if ( n == 0 ) break;
     
    for ( i  = 0 ; i < n ; i++ ){
      scanf("%d", &score[i] );
    }
 
    sum = 0;
     
    for ( i = 0 ; i < n ; i++ ){
      sum = sum + score[i];
    }
     
    ave = 1.0 * sum / n;
 
    sig = 0;
     
    for ( i = 0 ; i < n ; i++ ){
      sig + =( score[i] - ave ) * ( score[i] - ave );
    }
 
    v = sqrt( sig / n );
 
    printf("%.8lf\n", v );
 
  }
   
  return 0;
     
}

Compiler output:
main.c: In function 'main':
main.c:29:13: error: expected expression before '=' token
   29 |       sig + =( score[i] - ave ) * ( score[i] - ave );
      |             ^
Language: C

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

int main(void)
{
    int n, s[1000];

    while(scanf("%d", &n))
    {
        if(n == 0)
        {
            return 0;
        }

        double m = 0;
        
        int i;
        for(i = 0; i < n; ++i)
        {
            scanf("%d", &s[i]);
            m += s[i];
        }
        
        m /= n;
        
        double a = 0;
        for(int i = 0; i < n; ++i)
        {
            a += pow(s[i] - m, 2);
        }
        
        printf("%f\n", sqrt(a / n));
    }
}

Compiler output:
/usr/bin/ld: /tmp/cchdQFPV.o: in function `main':
main.c:(.text+0xe7): undefined reference to `pow'
/usr/bin/ld: main.c:(.text+0x124): undefined reference to `sqrt'
collect2: error: ld returned 1 exit status
Language: C

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

int main(void)
{
    int n, s[1000];

    while(scanf("%d", &n))
    {
        if(n == 0)
        {
            return 0;
        }

        double m = 0;
        
        int i;
        for(i = 0; i < n; ++i)
        {
            scanf("%d", &s[i]);
            m += s[i];
        }
        
        m /= n;
        
        double a = 0;
        for(int i = 0; i < n; ++i)
        {
            a += pow(s[i] - m, 2);
        }
        
        printf("%f\n", sqrt(a / n));
    }
}

Compiler output:
/usr/bin/ld: /tmp/ccR2cZF9.o: in function `main':
main.c:(.text+0xe7): undefined reference to `pow'
/usr/bin/ld: main.c:(.text+0x124): undefined reference to `sqrt'
collect2: error: ld returned 1 exit status
Language: C

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

int main(){
  while(1){
    int n;
    scanf("%d", &n);
    if(n == 0) break;
    int points[n];
    for ( int i = 0; i < n; i++ ){
      scanf( "%d", &points[i] );
    }
    int sum = 0;
    for (int i = 0; i < n ; i++ ){
      sum += points[i];
    }
    double avg;
    avg = 1.0*sum / n;
    double devpoints[n];
    for (int i = 0; i < n; i++ ){
      devpoints[i] = (points[i] - avg)*(points[i] - avg);
    }
    double a2 = 0.o;
    for ( int i = 0; i < n; i++ ){
      a2 += devpoints[i];
    }
    double a;
    a = sqrt(a2/n);


    printf("%lf\n", a);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:23:17: error: invalid suffix "o" on floating constant
   23 |     double a2 = 0.o;
      |                 ^~~
Language: C

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

double X(int s[],int n,double ave);

int main(void) {
	int s[1000];
	int n,i,sum,
	double ave;
	for(;;){
		scanf("%d",&n);
		if(n==0) break;
		sum=0;
		for(i=0;i<n;i++){
			scanf("%d",&s[i]);
			sum+=s[i];
		}
		ave=sum/n;
		printf("%lf\n",sqrt(X(s,n,ave)));
	}
	return 0;
}

double X(int s[],int n,double ave){
	double sum=0;
	for(int i=0;i<n;i++){
		sum+=(s[i]-ave)*(s[i]-ave);
	}
	return sum/n;
}


Compiler output:
main.c: In function 'main':
main.c:9:9: error: expected identifier or '(' before 'double'
    9 |         double ave;
      |         ^~~~~~
main.c:18:17: error: 'ave' undeclared (first use in this function)
   18 |                 ave=sum/n;
      |                 ^~~
main.c:18:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

void calc(int n){
std::vector<double> vec; 
double m=0,ans=0;
for(int i=0;i<n;i++){
	double s;
	scanf("%lf",&s);
	vec.push_back(s);
	m+=s;
}
m/=n;
for(int i=0;i<n;i++){
	ans+=(vec[i]-m)*(vec[i]-m);
}
ans/=n;
printf("%lf\n",sqrt(ans));
}

int main() {
int n;
while(1){
	scanf("%d",&n);
	if(n==0)break;
	calc(n);
}
}


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

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

int main(void){
    int n,a2,t[1001],sum=0,i;
    double ave,a=0;
    scanf("%d\n", &n);
    if(n == 0)break;
    
        for(i=0;i<n;i++){
            scanf("%d ", &t[i]);
            sum+=t[i];
        }
        ave=sum/n;
        for(i=0;i<n;i++){
            a+=((t[i]-ave)*(t[i]-ave));
        }
        printf("%.4f\n",sqrt(a/n));
    return 0;
    
}
 



Compiler output:
main.c: In function 'main':
main.c:8:15: error: break statement not within loop or switch
    8 |     if(n == 0)break;
      |               ^~~~~
Language: C

#include<cstdio>
#include<cmath>
int main(){
	int n;
	while(scanf("%d",&n) && n){
		int s[1000]={},sum=0;
		for(int i=0;i<n;i++){
			scanf("&d",&s[i]);
			sum+=s[i];
		}
		double m=(double)sum/(double)n,ssum=0;
		for(int i=0;i<n;i++) ssum += pow((s[i]-m),2);
		printf("%.7f\n",sqrt(ssum/(double)n));
	}
}


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

#include<cstdio>
#include<cmath>
int main(){
  int n;
  while(scanf("%d",&n) && n){
    int s[1000]={},sum=0;
    for(int i=0;i<n;i++){
      scanf("%d",&s[i]);
      sum += s[i];
    }
    double m = (double)sum / (double)n,ssum=0;
    for(int i=0;i<n;i++) ssum += pow((s[i]-m),2);
    printf("%.7f\n",sqrt(ssum/(double)n));
  }
}



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

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

int main(){
	
	int n, i, j=0,sum;
	int  a[1000];
	double avg,temp;
	double b[50];
	
	while(1){
		scanf("%d", n);
		if(n==0){
			break;
		}
		for(i=0;i<n;i++){
			scanf("%d", a[i]);
			sum = sum + a[i];
		}
		avg = (double)sum / n;
		for(i=0;i<n;i++){
			temp = temp + pow(a[i] - avg, 2);
		}

		b[j++] = sqrt((double)temp/n):
	}
	
	for(i=0;i<j;i+){
		printf("%f\n", b[i]);
	}
    
	return 0;

}

Compiler output:
main.c: In function 'main':
main.c:25:46: error: expected ';' before ':' token
   25 |                 b[j++] = sqrt((double)temp/n):
      |                                              ^
      |                                              ;
main.c:28:23: error: expected expression before ')' token
   28 |         for(i=0;i<j;i+){
      |                       ^
Language: C

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

int main(void)
{
  while(1){
  int n,i;
  scanf("%d",&n);
  if (n==0) break;
  else{
  int s1[1001];
  for(i=0;i<n;i++)  scanf("%d",&s1[i]);
  
  int sum=0;
  for(i=0;i<n;i++) sum+=s1[i];
  double ave = (double)sum/n;
  //printf("%ls\n",ave);
  double a=0;
  for(i=0;i<n;i++)
    a+=(s1[i]-ave)*(s1[i]-ave);
  double dev=sqrt(a/n);
  printf("%ls\n",dev);
  }
  return 0;
}  

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

#include<stdio.h>
#include<math.h>
int main()
{
	int n,s[1005],i;
	double a x;
	for(;scanf("%d",&n),n;)
	{
		for(i=a=0;i<n;a+=s[i++])
			scanf("%d",&s[i]);
		a/=n;
		for(i=x=0;i<n;i++)
			x+=(s[i]-a)*(s[i]-a);
		printf("%.8f\n",sqrt((double)x/n));
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'x'
    6 |         double a x;
      |                  ^
main.c:6:18: error: 'x' undeclared (first use in this function)
main.c:6:18: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:23: error: 'a' undeclared (first use in this function)
    9 |                 for(i=a=0;i<n;a+=s[i++])
      |                       ^
Language: C

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

int i;
double n,score[1000],ave=0,sigma=0;

while(1){

if(n==0)return 0;
cin>>n;

for(i=0; i<n; i++){
cin>>score[i];
ave+=score[i];
}

ave/=n;

for(i=0; i<n; i++)sigma+=(double)(score[i]-ave)*(score[i]-ave);

printf("%.8f\n",sqrt(sigma/n));

}

}

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

#include <stdio.h> 
#include <math.h> 
#define MAX 1000 
 
 
int main(){   
   int n; 
   int i, j=0, sum; 
    int score[MAX]; 
     double ave, tmp; 
     double dev[MAX]; 
 
 
     while(1){ 
         scanf("%d", &n); 
       if(n==0)break; 
         sum=0; 
         for(i=0;i<n;i++){ 
             scanf("%d", &score[i]); 
             sum+=score[i]; 
         } 
       ave=(double)sum/(double)n; 
        tmp=0.0; 
         for(i=0;i<n;i++){ 
             tmp+=pow(score[i]-ave, 2); 6    
     } 
         dev[j++]=sqrt(tmp/(double)n); 
     } 
     for(i=0;i<j;i++){ 
        printf("%f\n", dev[i]); 
     } 
     return 0; 
 } 



Compiler output:
a.cc: In function 'int main()':
a.cc:25:42: error: expected ';' before '}' token
   25 |              tmp+=pow(score[i]-ave, 2); 6
      |                                          ^
      |                                          ;
   26 |      }
      |      ~
Language: C++

using namespace std;

int main(){
  int n,sum=0;
  float var=0,m;

  while(true){
    cin >> n;
    if(n == 0) break;
    int* S = new int[n];
    for(int i=0;i<n;i++){
      cin >> S[i];
      sum += S[i];
    }

    m = sum/n;
    for(int i=0;i<n;i++){
      var += (S[i] - m) * (S[i] - m);
    }
    delete[] S;
    cout << setprecision(10) << sqrt(var / n) << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope
    8 |     cin >> n;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:21:5: error: 'cout' was not declared in this scope
   21 |     cout << setprecision(10) << sqrt(var / n) << endl;
      |     ^~~~
a.cc:21:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:21:13: error: 'setprecision' was not declared in this scope
   21 |     cout << setprecision(10) << sqrt(var / n) << endl;
      |             ^~~~~~~~~~~~
a.cc:1:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
  +++ |+#include <iomanip>
    1 | using namespace std;
a.cc:21:33: error: 'sqrt' was not declared in this scope
   21 |     cout << setprecision(10) << sqrt(var / n) << endl;
      |                                 ^~~~
a.cc:21:50: error: 'endl' was not declared in this scope
   21 |     cout << setprecision(10) << sqrt(var / n) << endl;
      |                                                  ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

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

int main() {
	int q = 0;
	while (1) {
		double n;
		double date[1000;
		double sum = 0;
		double var = 0;
		string haki;
		cin >> n;
		getline(cin, haki);
		if (n == 0)break;
		for (int i = 0; i < n; i++) {
			cin >> date[i];
			sum += date[i];
		}
		double ave = sum / n;
		for (int i = 0; i < n; i++) {
			var += pow(date[i] - ave, 2);
		}
		cout << fixed << pow(var / n,0.5) << endl;
		q++;
		if (q > 10)break;

	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:33: error: expected ']' before ';' token
   11 |                 double date[1000;
      |                                 ^
      |                                 ]
a.cc:19:32: error: 'date' was not declared in this scope
   19 |                         cin >> date[i];
      |                                ^~~~
a.cc:24:36: error: 'date' was not declared in this scope
   24 |                         var += pow(date[i] - ave, 2);
      |                                    ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
const double pi = 3.141592653589793;

int main(){
    while(true){
        int n; cin >> n;
        if(n == 0) break;
        double sum_1 = 0, sum_2 = 0;
        for(int i = 0; i < n; i++){
            double a; cin >> a;
            sum_1 += a; sum_2 += a * a;
        }
        double st_dev = sqrt((sum_2 - sum_1 * sum_1) / n);
        printf("%.10f\n", st_dev)
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:34: error: expected ';' before '}' token
   15 |         printf("%.10f\n", st_dev)
      |                                  ^
      |                                  ;
   16 |     }
      |     ~
Language: C++

#include<iostream>
#include<stdio.h>
#include<math.h>
using namespace std;

int main(){
 int n;
 int s[i];
 while(1){
   cin >> n;
   if(n == 0) break;
   for(i = 0; i < n; i++){
       cin >> s[i];
    }
   int sum = 0
   for(i = 0; i < n; i++){
     sum += s[i];
   }
   double ave = 1.0 * sum / n;
   double val = 0.0;
   for(i = 0; i < n; i++){
     val += (s[i] - ave) * (a[i] - ave);
   }
   double SD = sqrt( val/n );
   cout << SD << endl;
  }
return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: 'i' was not declared in this scope
    8 |  int s[i];
      |        ^
a.cc:13:15: error: 's' was not declared in this scope
   13 |        cin >> s[i];
      |               ^
a.cc:16:4: error: expected ',' or ';' before 'for'
   16 |    for(i = 0; i < n; i++){
      |    ^~~
a.cc:22:14: error: 's' was not declared in this scope
   22 |      val += (s[i] - ave) * (a[i] - ave);
      |              ^
a.cc:22:29: error: 'a' was not declared in this scope
   22 |      val += (s[i] - ave) * (a[i] - ave);
      |                             ^
Language: C++

#include<iostream>
#include<stdio.h>
#include<math.h>
using namespace std;

int main(){
 int n;
 int s[i];
 while(1){
   cin >> n;
   if(n == 0) break;
   for(i = 0; i < n; i++){
       cin >> s[i];
    }
   int sum = 0;
   for(i = 0; i < n; i++){
     sum += s[i];
   }
   double ave = 1.0 * sum / n;
   double val = 0.0;
   for(i = 0; i < n; i++){
     val += (s[i] - ave) * (a[i] - ave);
   }
   double SD = sqrt( val/n );
   printf("%f\n", SD);
  }
return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: 'i' was not declared in this scope
    8 |  int s[i];
      |        ^
a.cc:13:15: error: 's' was not declared in this scope
   13 |        cin >> s[i];
      |               ^
a.cc:17:13: error: 's' was not declared in this scope
   17 |      sum += s[i];
      |             ^
a.cc:22:14: error: 's' was not declared in this scope
   22 |      val += (s[i] - ave) * (a[i] - ave);
      |              ^
a.cc:22:29: error: 'a' was not declared in this scope
   22 |      val += (s[i] - ave) * (a[i] - ave);
      |                             ^
Language: C++

#include<iostream>
#include<stdio.h>
#include<math.h>
using namespace std;

int main(){
 int n;
 int s[i];
 while(1){
   cin >> n;
   if(n == 0) break;
   for(i = 0; i < n; i++){
       cin >> s[i];
    }
   int sum = 0;
   for(i = 0; i < n; i++){
     sum += s[i];
   }
   double ave = 1.0 * sum / n;
   double val = 0.0;
   for(i = 0; i < n; i++){
     val += (s[i] - ave) * (s[i] - ave);
   }
   double SD = sqrt( val/n );
   printf("%f\n", SD);
  }
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: 'i' was not declared in this scope
    8 |  int s[i];
      |        ^
a.cc:13:15: error: 's' was not declared in this scope
   13 |        cin >> s[i];
      |               ^
a.cc:17:13: error: 's' was not declared in this scope
   17 |      sum += s[i];
      |             ^
a.cc:22:14: error: 's' was not declared in this scope
   22 |      val += (s[i] - ave) * (s[i] - ave);
      |              ^
Language: C++

#include<iostream>
#include<stdio.h>
#include<math.h>
using namespace std;

int main(){
 int n;
 int s[i];
 while(1){
   cin >> n;
   if(n == 0) break;
   for(int i = 0; i < n; i++){
       cin >> s[i];
    }
   int sum = 0;
   for(int i = 0; i < n; i++){
     sum += s[i];
   }
   double ave = 1.0 * sum / n;
   double val = 0.0;
   for(int i = 0; i < n; i++){
     val += (s[i] - ave) * (s[i] - ave);
   }
   double SD = sqrt( 1.0 * val / n );
   printf("%f\n", SD);
  }
return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: 'i' was not declared in this scope
    8 |  int s[i];
      |        ^
a.cc:13:15: error: 's' was not declared in this scope
   13 |        cin >> s[i];
      |               ^
a.cc:17:13: error: 's' was not declared in this scope
   17 |      sum += s[i];
      |             ^
a.cc:22:14: error: 's' was not declared in this scope
   22 |      val += (s[i] - ave) * (s[i] - ave);
      |              ^
Language: C++

#include <bits/stdc++.h>
typedef long long LL;
using namespace std;

int main() {
  while (true) {
    int n;
    cin >> n;
    if (n == 0) break;
    vector<int> a(n);
    int sum = 0;
    for (int i = 0; i < n; i ++) {
      cin >> a[i];
      sum += a[i];
    }
    double av = (double)a[i] / n;

    double ans = 0;
    for (int i = 0; i < n; i ++) {
      ans += (a[i] - av) * (a[i] - av);
    }
    ans /= n;

    cout << setprecision(15) << ans << endl;
  }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:16:27: error: 'i' was not declared in this scope
   16 |     double av = (double)a[i] / n;
      |                           ^
Language: C++

#include<iostream>
#include<stdio.h>
#include<math.h>
using namespace std;

int main(){
 while(1){
  int n;
  cin >> n;
  if(n == 0) break;
  int s[];
  for(int i; i < n; i++) cin >> s[i];

  int sum = 0;
  for(int i; i < n; i++){
    sum += s[i];
  }
  double mean = 1.0 * sum / n;
  double var = 0.0;
  for(int i; i < n; i++){
    var += 1.0*(s[i] - mean)*(s[i] - mean);
   }
  double SD = sqrt(1.0 * var / n);
  printf("%f\n", SD);
  }
 return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:7: error: storage size of 's' isn't known
   11 |   int s[];
      |       ^
Language: C++

#include <math.h>
using namespace std;
int main(void){
    int n,s[1000];
    double a,m;
    while(1){
        cin>>n;
        if(!n) break;
        m=a=0;
        for(int i=0;i<n;i++){
            cin>>s[i];
            m+=s[i];
        }
        m/=n;
        for(int i=0;i<n;i++){
            a+=(s[i]-m)*(s[i]-m);
        }
        a=sqrt(a/n);
        cout<<fixed<<setprecision(6)<<a<<endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin>>n;
      |         ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <math.h>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:19:9: error: 'cout' was not declared in this scope
   19 |         cout<<fixed<<setprecision(6)<<a<<endl;
      |         ^~~~
a.cc:19:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:19:15: error: 'fixed' was not declared in this scope
   19 |         cout<<fixed<<setprecision(6)<<a<<endl;
      |               ^~~~~
a.cc:2:1: note: 'std::fixed' is defined in header '<ios>'; this is probably fixable by adding '#include <ios>'
    1 | #include <math.h>
  +++ |+#include <ios>
    2 | using namespace std;
a.cc:19:22: error: 'setprecision' was not declared in this scope
   19 |         cout<<fixed<<setprecision(6)<<a<<endl;
      |                      ^~~~~~~~~~~~
a.cc:2:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
    1 | #include <math.h>
  +++ |+#include <iomanip>
    2 | using namespace std;
a.cc:19:42: error: 'endl' was not declared in this scope
   19 |         cout<<fixed<<setprecision(6)<<a<<endl;
      |                                          ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <math.h>
  +++ |+#include <ostream>
    2 | using namespace std;
Language: C++

#include <math.h>
using namespace std;
int main(void){
    int n,s[1000],i;
    double a,m;
    while(1){
        cin>>n;
        if(!n) 
           break;
        m=a=0;
        for(i=0;i<n;i++){
            cin>>s[i];
            m+=s[i];
        }
        m/=n;
        for(i=0;i<n;i++){
            a+=(s[i]-m)*(s[i]-m);
        }
        a=sqrt(a/n);
        cout<<fixed<<setprecision(6)<<a<<endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin>>n;
      |         ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <math.h>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:20:9: error: 'cout' was not declared in this scope
   20 |         cout<<fixed<<setprecision(6)<<a<<endl;
      |         ^~~~
a.cc:20:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:20:15: error: 'fixed' was not declared in this scope
   20 |         cout<<fixed<<setprecision(6)<<a<<endl;
      |               ^~~~~
a.cc:2:1: note: 'std::fixed' is defined in header '<ios>'; this is probably fixable by adding '#include <ios>'
    1 | #include <math.h>
  +++ |+#include <ios>
    2 | using namespace std;
a.cc:20:22: error: 'setprecision' was not declared in this scope
   20 |         cout<<fixed<<setprecision(6)<<a<<endl;
      |                      ^~~~~~~~~~~~
a.cc:2:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
    1 | #include <math.h>
  +++ |+#include <iomanip>
    2 | using namespace std;
a.cc:20:42: error: 'endl' was not declared in this scope
   20 |         cout<<fixed<<setprecision(6)<<a<<endl;
      |                                          ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <math.h>
  +++ |+#include <ostream>
    2 | using namespace std;
Language: C++

#include<iostream>
using namespace std;

int main(){
    int n;
    cin>>n;
    double s[n],m=0,sigma=0;
    
    for(int i=0;i<n;i++){cin>>s[i];m+=s[i];}
    m/=n;
    for(int i=0;i<n;i++){
        sigma+=pow(s[i]-m,2);
    }
    sigma/=n;
    cout<<sigma<<endl;
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:16: error: 'pow' was not declared in this scope
   12 |         sigma+=pow(s[i]-m,2);
      |                ^~~
Language: C++

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

int main(){
    while(){
    int n;
    cin>>n;
    if(n==0){
        break;
    }
    double s[n],m=0,sigma=0;
    
    for(int i=0;i<n;i++){cin>>s[i];m+=s[i];}
    m/=double(n);
    for(int i=0;i<n;i++){
        sigma+=pow(s[i]-m,2);
    }
    sigma/=double(n);
    cout<<sigma<<endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: expected primary-expression before ')' token
    6 |     while(){
      |           ^
Language: C++

#include <iostream>
#include <stdio.h>
#include <cmath>
using namespace std;
int main(){
    int m,n,s;
    while(1){
        int l=0;
        double a=0,b=0,c=0;
        cin>>n;
        int S[n+1];
        if(n==0){
            break;
        }
        for(int i=0;i<n;i++){
            cin>>s;
            S[i]=s;
            l=l+s;
        }
        m = l/n;
        for(int k=0;k<n;k++){
            c=(S[k]-m)(S[k]-m);
            a=a+c;
        }
            b=a/n;
    }
    printf("%.8lf\n", b);
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:23: error: expression cannot be used as a function
   22 |             c=(S[k]-m)(S[k]-m);
      |               ~~~~~~~~^~~~~~~~
a.cc:27:23: error: 'b' was not declared in this scope
   27 |     printf("%.8lf\n", b);
      |                       ^
Language: C++

#include <iostream>
#include <stdio.h>
#include <cmath>
using namespace std;
int main(){
    int m,n,s;
    while(1){
        int l=0;
        double a=0,c=0,b=0;
        cin>>n;
        int S[n+1];
        if(n==0){
            break;
        }
        for(int i=0;i<n;i++){
            cin>>s;
            S[i]=s;
            l=l+s;
        }
        m = l/n;
        for(int k=0;k<n;k++){
            c=(S[k]-m)(S[k]-m);
            a=a+c;
        }
            b=a/n;
            printf("%.8lf\n", b);            
    }
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:23: error: expression cannot be used as a function
   22 |             c=(S[k]-m)(S[k]-m);
      |               ~~~~~~~~^~~~~~~~
Language: C++

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

int main(void) {
    int n;
    int a[100] = {};
    double m, a;
    
    while(true) {
        m = 0;
        a = 0;
        cin >> n;
        
        if(n == 0)   break;
        
        for(int i = 0; i < n; ++i) {
            cin >> s[i];
            m += s[i];
        }
        m /= n;
        
        for(int i = 0; i < n; ++i) {
            a += (s[i] - m)*(s[i] - m);
        }
        a /= n;
        
        printf("%lf\n", a);
    }
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: conflicting declaration 'double a'
    9 |     double m, a;
      |               ^
a.cc:8:9: note: previous declaration as 'int a [100]'
    8 |     int a[100] = {};
      |         ^
a.cc:13:11: error: incompatible types in assignment of 'int' to 'int [100]'
   13 |         a = 0;
      |         ~~^~~
a.cc:19:20: error: 's' was not declared in this scope
   19 |             cin >> s[i];
      |                    ^
a.cc:25:19: error: 's' was not declared in this scope
   25 |             a += (s[i] - m)*(s[i] - m);
      |                   ^
a.cc:27:11: error: invalid operands of types 'int [100]' and 'int' to binary 'operator/'
   27 |         a /= n;
      |         ~~^~~~
a.cc:27:11: note:   in evaluation of 'operator/=(int [100], int)'
Language: C++

#include<iostream>
#include<stdio.h>
#include<cmath>
using namespace std;
int main(){
    int n,S[1000]={};
    while(true){
        count=0;
        double m,sigma=0,a;
        cin>>n;
        if(n==0) break;
        for(int i=0;i<n;i++){
            cin>>S[i];
            count+=S[i];
        }
        m=1.0*count/n;
        for(int i=0;i<n;i++){
            sigma+=(S[i]-m)*(S[i]-m);
        }
        a=sqrt(sigma/n);
        printf("%f\n",a);
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'count' was not declared in this scope
    8 |         count=0;
      |         ^~~~~
Language: C++

#include<iostream>
#niclude <cmath>

using namespace std;

int main() {
    int n, m, s[1000],i;
    double a;
    while(cin >> n, n){
        m=0;
        for(i=0;i<n;i++){
            cin >> s[i];
            m+=s[i];
        }       
        m/=n;
        a=0;
        for(i=0;i<n;i++){
            a+=pow(s[i]-m,2);
        }
        a/=n;
        cout << sqrt(a) << endl;
        
    }
}

Compiler output:
a.cc:2:2: error: invalid preprocessing directive #niclude; did you mean #include?
    2 | #niclude <cmath>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:18:16: error: 'pow' was not declared in this scope
   18 |             a+=pow(s[i]-m,2);
      |                ^~~
a.cc:21:17: error: 'sqrt' was not declared in this scope
   21 |         cout << sqrt(a) << endl;
      |                 ^~~~
Language: C++

#include <iostream>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;

int main()
{
	int n;
	int a[1001];
	while(cin >> n && n)
	{
		double sum = 0;
		rep(i,n) 
		{
			cin >> a[i];
			sum += a[i];
		}

		sum /= n;
		double ans = 0;
		rep(i,n)
		{
			ans += ((a[i] - sum)*(a[i] - sum))/n;
		}
		cout << fixed;
		cout.precision(8);
		cout << sqrt(ans) << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:25: error: 'sqrt' was not declared in this scope
   26 |                 cout << sqrt(ans) << endl;
      |                         ^~~~
Language: C++

#include<iostream>
#include<vector>
#include<cstring>
#include<cstdio>
using namespace std;

int main(){
	double a, m;
	int n, i;
	vector<double> s;
	cin >> n;
	while(n != 0){
		s.reserve(n);
		for(i=0;i<n;i++){
			cin >> s[i];
			m += s[i];
		}
		m /= n;
		for(i=0;i<n;i++){
			a += (s[i] - m) * (s[i] - m);
		}
		a /= n;
		a = sqrt(a);
		printf("%.8f\n", a);
		cin >> n;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:21: error: 'sqrt' was not declared in this scope
   23 |                 a = sqrt(a);
      |                     ^~~~
Language: C++

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

using namespace std;

 void main(){
	 while( true ) {
		int studentNum = 0;
		cin >> studentNum;

		if ( studentNum == 0 ) {
			break;
		}

		vector<int> point(studentNum, 0);
		int sum = 0;
		for ( int i = 0; i < studentNum; i++ ) {
			cin >> point[i];
			sum += point[i];

		}

		// calculate average
		double average = (double)sum / (double)studentNum;
			
		// calculate variance
		double variance = 0;
		for( int i = 0; i < studentNum; i++ ) {
			double deviation	=	point[i]	- average;
			variance			+=	deviation	* deviation;

		}
		variance = variance / studentNum;
			
		// calculate standardDeviation
		double stdDeviation = sqrt(variance );

		cout << stdDeviation;

	 }
}

Compiler output:
a.cc:7:2: error: '::main' must return 'int'
    7 |  void main(){
      |  ^~~~
Language: C++

int main(){
	int n;
	double a=0 , m=0;
	while(cin>>n && n!=0){
	int *s =new int[n];
	for(int i=0;i<n;i++){
		cin>>s[i];
		m+=s[i];
	}
	m/=n;
	cout << m << endl;
	for(int i=0; i<n ; i++){
		a+=((s[i]-m)*(s[i]-m))/n;
	}
	cout << fixed << setprecision(9) << sqrt(a) << endl;
	delete [] s;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:15: error: 'cin' was not declared in this scope
    4 |         while(cin>>n && n!=0){
      |               ^~~
a.cc:11:9: error: 'cout' was not declared in this scope
   11 |         cout << m << endl;
      |         ^~~~
a.cc:11:22: error: 'endl' was not declared in this scope
   11 |         cout << m << endl;
      |                      ^~~~
a.cc:15:17: error: 'fixed' was not declared in this scope
   15 |         cout << fixed << setprecision(9) << sqrt(a) << endl;
      |                 ^~~~~
a.cc:15:26: error: 'setprecision' was not declared in this scope
   15 |         cout << fixed << setprecision(9) << sqrt(a) << endl;
      |                          ^~~~~~~~~~~~
a.cc:15:45: error: 'sqrt' was not declared in this scope
   15 |         cout << fixed << setprecision(9) << sqrt(a) << endl;
      |                                             ^~~~
Language: C++

#include<stdio.h>
#include <iostream>
#include <math.h>
using namespace std;

int main(){
	
	double n, s[1000], data, x = 0, m, y = 0;
	
	while(1){
		
		cin >> n;
		if(n == 0) break;
		
		for(int i = 0; i < n; ++i){
			cin >> s[i];
			x += s[i];
		}
		
		m = x/n;
		
		for(int i = 0; i < n; ++i){
			y += (s[i] - m) * (s[i] - m);
		}
		
		printf("%f\n",sqrt(y/n));
		
		return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:2: error: expected '}' at end of input
   29 | }
      |  ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <functional>
#include <queue>
#include <set>
#include <map>
#include <numeric>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cctype>

#define rep(i, a) REP(i, 0, a)
#define REP(i, a, b) for(int i = a; i < b; ++i)

typedef long long ll;
typedef unsigned long long ull;
typedef std::pair<int, int> P;
typedef std::pair<P, int> PP;
const double PI = 3.14159265358979323846;
const double esp = 1e-9;
const int infi = (int)1e+9 + 10;
const ll infll = (ll)1e+17 + 10;

int main(){
	int n;
	while (std::cin >> n, n){
		double s[1001];
		double m, a = 0;
		rep(i, n)std::cin >> s[i];
		m = std::accumulate(s, s + n, 0.0) / n;
		rep(i, n)a += (s[i] - m) * (s[i] - m);
		a /= n;
		a = sqrt(a);
		printf("%.10lf\n", a);
		return 0;
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:10: error: expected '}' at end of input
   39 |         }
      |          ^
a.cc:27:11: note: to match this '{'
   27 | int main(){
      |           ^
Language: C++

#include <cstdio>
#include <queue>
#include <cmath>
using namespace std;
int main(){
  double n;
  double *s;
  queue<double> out;
  while(1){
    scanf("%d", &n);
    if(n == 0)
      break;
    else{
      s = new double[n];
      double a, b = 0;
      for(int i = 0; i < n; i++){
	scanf("%d", &s[i]);
	a += s[i];
	b += pow(s[i], 2);
      }
      a /= n;
      a *= a;
      b /= n;
      double var = b - a;
      out.push(sqrt(var));
    }
  }
  while(!out.empty()){
    printf("%f\n", out.front());
    out.pop();
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:22: error: expression in new-declarator must have integral or enumeration type
   14 |       s = new double[n];
      |                      ^
Language: C++

#include <cstdio>
#include <queue>
#include <cmath>
using namespace std;
int main(){
  int n;
  double *s, *t;
  queue<double> out;
  while(1){
    scanf("%d", &n);
    if(n == 0)
      break;
    else{
      s = new double[n];
      t = new double[t];
      double a, b = 0;
      for(int i = 0; i < n; i++){
	scanf("%d", &s[i]);
	t[i] = s[i] * s[i];
	a += s[i];
	b += t[i];
      }
      a = (a * a) / (n * n);
      b /= n;
      double var = b - a;
      out.push(sqrt(var));
      delete[] s;
    }
  }
  while(!out.empty()){
    printf("%.8f\n", out.front());
    out.pop();
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:22: error: expression in new-declarator must have integral or enumeration type
   15 |       t = new double[t];
      |                      ^