criyle/codenet-compile-errors huggingface dataset:
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 int[n];
      t = new int[n];
      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:14:11: error: cannot convert 'int*' to 'double*' in assignment
   14 |       s = new int[n];
      |           ^~~~~~~~~~
      |           |
      |           int*
a.cc:15:11: error: cannot convert 'int*' to 'double*' in assignment
   15 |       t = new int[n];
      |           ^~~~~~~~~~
      |           |
      |           int*
Language: C++

#include <bits/stdc++>
using namespace std;

int main(){
	int n, i;
	double a, sum, c, average;

	for(;;){
		int s[1001]={};
		sum = 0;
		cin >> n;
		if(n == 0)
		break;

		for(i = 0;i < n;i++){
			cin >> s[i];
			sum += s[i];
		}
		average = (double)sum / n;
		sum = 0;

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

			c = (double)sum / n;
			a = sqrt(c);

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

Compiler output:
a.cc:1:10: fatal error: bits/stdc++: No such file or directory
    1 | #include <bits/stdc++>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<stdio.h>
#include<math.h>
int main(void){
	int n,i,gou=0;
	int ten[1000];
	double hei,a,b,bun;
	
	while(1){
	scanf("%d",&n);
	if(n==0){
		break;
		return;
	}
	for(i=0;i<n;i++){
		scanf("%d",&ten[i]);
		gou += ten[i];
	}
	hei = gou/n;
	//printf("%f",hei);
	for(i=0;i<n;i++){
		a = ten[i] - hei;
		b += pow(a,2.0);
	}
	bun = sqrt(b/n);
	printf("%.8f\n",bun);
	gou=0;
	b=0;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: return-statement with no value, in function returning 'int' [-fpermissive]
   12 |                 return;
      |                 ^~~~~~
Language: C++

#i#include<stdio.h>
#include<math.h>
int main(void){
	int n,i,gou=0;
	int ten[1000];
	double hei,a,b,bun;
	
	while(1){
	scanf("%d",&n);
	if(n==0){
		break;
		return;
	}
	for(i=0;i<n;i++){
		scanf("%d",&ten[i]);
		gou += ten[i];
	}
	hei = gou/n;
	for(i=0;i<n;i++){
		a = ten[i] - hei;
		b += pow(a,2.0);
	}
	bun = sqrt(b/n);
	printf("%.8f\n",bun);
	gou=0;
	b=0;
	}
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #i; did you mean #if?
    1 | #i#include<stdio.h>
      |  ^
      |  if
a.cc: In function 'int main()':
a.cc:9:9: error: 'scanf' was not declared in this scope
    9 |         scanf("%d",&n);
      |         ^~~~~
a.cc:12:17: error: return-statement with no value, in function returning 'int' [-fpermissive]
   12 |                 return;
      |                 ^~~~~~
a.cc:24:9: error: 'printf' was not declared in this scope
   24 |         printf("%.8f\n",bun);
      |         ^~~~~~
a.cc:3:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    2 | #include<math.h>
  +++ |+#include <cstdio>
    3 | int main(void){
Language: C++

#include<stdio.h>
#include<math.h>
int main(void){
	int n,i,gou=0;
	int ten[1000];
	double hei,a,b,bun;
	
	while(1){
	scanf("%d",&n);
	if(n==0){
		break;
		return;
	}
	for(i=0;i<n;i++){
		scanf("%d",&ten[i]);
		gou += ten[i];
	}
	hei = gou/n;
	for(i=0;i<n;i++){
		a = ten[i] - hei;
		b += pow(a,2.0);
	}
	bun = sqrt(b/n);
	printf("%.8f\n",bun);
	gou=0;
	b=0;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: return-statement with no value, in function returning 'int' [-fpermissive]
   12 |                 return;
      |                 ^~~~~~
Language: C++

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

int main(){
	long n = 0;
	while (cin >> n){
		if (n == 0) break;
		vector<long> s(n, 0);
		for (long i = 0; i < n; i++){
			cin >> s[i];
		}
		long s = 0;
		for (long i = 0; i < n; i++){
			s += s[i];
		}
		double ave = 0;
		ave = (double)s / n;
		double sum = 0;
		for (long i = 0; i < n; i++){
			sum += (s[i] - ave) * (s[i] - ave);
		}
		cout << fixed << sqrt(sum / n) << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:22: error: conflicting declaration 'long int s'
   14 |                 long s = 0;
      |                      ^
a.cc:10:30: note: previous declaration as 'std::vector<long int> s'
   10 |                 vector<long> s(n, 0);
      |                              ^
a.cc:16:27: error: no match for 'operator+=' (operand types are 'std::vector<long int>' and '__gnu_cxx::__alloc_traits<std::allocator<long int>, long int>::value_type' {aka 'long int'})
   16 |                         s += s[i];
a.cc:19:23: error: invalid cast from type 'std::vector<long int>' to type 'double'
   19 |                 ave = (double)s / n;
      |                       ^~~~~~~~~
Language: C++

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

using namespace std;

int main() {
    long n,sum;
    long s[1000];
    sum = 0;

    cin >> n;
    for (int i = 0; i < n ; ++i) {
        cin >> s[i];
        sum += s[i];
    }

    //ave
    double ave = sum / n;

    //Dispersion
    double Dispersion = 0;
    for (int j = 0; j < n ; ++j) {
        Dispersion += (s[j] - ave)*(s[j] - ave)/n;
    }

    double ?± = sqrt(Dispersion);
    cout << ?± << endl;

     return 0;
}

Compiler output:
a.cc:26:13: error: extended character ± is not valid in an identifier
   26 |     double ?± = sqrt(Dispersion);
      |             ^
a.cc:27:14: error: extended character ± is not valid in an identifier
   27 |     cout << ?± << endl;
      |              ^
a.cc: In function 'int main()':
a.cc:26:12: error: expected unqualified-id before '?' token
   26 |     double ?± = sqrt(Dispersion);
      |            ^
a.cc:27:13: error: expected primary-expression before '?' token
   27 |     cout << ?± << endl;
      |             ^
a.cc:27:14: error: '\U000000b1' was not declared in this scope
   27 |     cout << ?± << endl;
      |              ^
a.cc:27:23: error: expected ':' before ';' token
   27 |     cout << ?± << endl;
      |                       ^
      |                       :
a.cc:27:23: error: expected primary-expression before ';' token
Language: C++

#include <iostream>
#include<iomanip>
#include<math.h>
using namespace std;
int main() {
  while(1){
    int n;
    cin>>n;
    if(n==0)break;
    int s[n];
    double sum=0;
    for(int i=0;i<n;i++){
      cin>>s[i];
      sum+=s[i];
    }
    double a=0;
    sum/=n;
    for(int i=0;i<n;i++)a+=pow(s[i]-m,2)/n;
    cout<<setprecision(10)<<sqrt(a)<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:37: error: 'm' was not declared in this scope
   18 |     for(int i=0;i<n;i++)a+=pow(s[i]-m,2)/n;
      |                                     ^
Language: C++


#include <iostream>
#include <vector>
#include <numeric>

double getStandardDeviation(const std::vector<int>& scores) {
	if (scores.empty()) {
		return 0.0;
	}

	int average = std::accumulate(scores.begin(), scores.end(), 0) / scores.size();
	double sum = 0.0;
	for (const auto& score : scores) {
		sum += pow(score - average, 2);
	}
	return sqrt(sum / scores.size());
}

void execute() {
	int n = 0;

	while (std::cin >> n && n) {
		// ???????????\???
		std::vector<int> scores;
		for (int i = 0; i < n; ++i) {
			int score = 0;
			std::cin >> score;
			scores.push_back(score);
		}
		std::cout << getStandardDeviation(scores) << std::endl;
	}
}

int main() {
	execute();

	return 0;
}

Compiler output:
a.cc: In function 'double getStandardDeviation(const std::vector<int>&)':
a.cc:14:24: error: 'pow' was not declared in this scope
   14 |                 sum += pow(score - average, 2);
      |                        ^~~
a.cc:16:16: error: 'sqrt' was not declared in this scope
   16 |         return sqrt(sum / scores.size());
      |                ^~~~
Language: C++


#include <iostream>
#include <vector>
#include <numeric>

double getStandardDeviation(const std::vector<int>& scores) {
	if (scores.empty()) {
		return 0.0;
	}

	int average = std::accumulate(scores.begin(), scores.end(), 0) / scores.size();
	double sum = 0.0;
	for (const auto& score : scores) {
		sum += std::pow(score - average, 2);
	}
	return sqrt(sum / scores.size());
}

void execute() {
	int n = 0;

	while (std::cin >> n && n) {
		// ???????????\???
		std::vector<int> scores;
		for (int i = 0; i < n; ++i) {
			int score = 0;
			std::cin >> score;
			scores.push_back(score);
		}
		std::cout << getStandardDeviation(scores) << std::endl;
	}
}

int main() {
	execute();

	return 0;
}

Compiler output:
a.cc: In function 'double getStandardDeviation(const std::vector<int>&)':
a.cc:14:29: error: 'pow' is not a member of 'std'
   14 |                 sum += std::pow(score - average, 2);
      |                             ^~~
a.cc:16:16: error: 'sqrt' was not declared in this scope
   16 |         return sqrt(sum / scores.size());
      |                ^~~~
Language: C++

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			int n = scan.nextInt();
			if(n == 0){
				scan.close();
				break;
			}
			int sum = 0;
			int s[] = new int[n];
			for(int i = 0; i < n; i++){
				s[i] = scan.nextInt();
				sum += s[i];
			}
			double m = Double.valueOf(sum) / Double.valueOf(n);
			double sig = 0;
			for(int i = 0; i < n; i++){
				sig += Math.pow(s[i] - m, 2);
			}
			double a = Math.sqrt(sig / n);
			System.out.println(a);
		}
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C++

import java.util.Scanner;

public class Main{
 public static void main(String[] args){
 Scanner sc = new Scanner(System.in);
 while(true){
 int n= sc.nextInt();
 if(n==0){break;}
 int[] scores=new int[n];
 double average=0, variance=0;
 for(int i=0; i<scores.length; i++){
 scores[i] =sc.nextInt();
 average += scores[i];
 }
 average /= n;
 for(int i=0; i<scores.length;i++){
 variance += (scores[i]-average)*(scores[i]-average);
 }
 variance /= n;
System.out.println(Math.sqrt(variance));
  }
 }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main{
      | ^~~~~~
Language: C++

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

int main()
{
    double n, a[1000],S=0,S2=0,ans2,ans;
    cin >> n;
    for (int i = 0; i < n; i++) {
        cin >> a[i];
        S += a[i];
        S2 += a[i] * a[i];
    }
    ans2 = pow(S/n,2) - S2/n;
    ans = sqrt(ans2);
    cout <<setprecision(10);
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:12: error: 'pow' was not declared in this scope
   14 |     ans2 = pow(S/n,2) - S2/n;
      |            ^~~
a.cc:15:11: error: 'sqrt' was not declared in this scope
   15 |     ans = sqrt(ans2);
      |           ^~~~
Language: C++

//?????????????????????????????¢????????§???running -> printf(%d)???%.8f?????????????????£???
#include <iostream>
#include<cmath>
#include<stdio.h>
using namespace std;

int main(){
	
	while(1){
		int n;//n=??????????????°
		if(n == 0) break;
	}
	
	int s[1000];//s=??????
	int i;
	double sum = 0;//????¨?????±???????sum
	
	double total = 0;
	for (i=0 ;i < n ;i++ ){
		cin >> s[i];
		sum += s[i];//????¨??????????
	}

	double m = sum/ n ;//??????
	
	double aa = 0;//?????£
	for (i=0 ;i<n ;i++){
		aa += (s[i] - m)*(s[i] - m)/n;//?????£
	}
	
	double a = sqrt(aa);//?¨??????????
	
	printf("%.4f\n" , a);
	
	return 0;
}
	
	
	

Compiler output:
a.cc: In function 'int main()':
a.cc:19:23: error: 'n' was not declared in this scope
   19 |         for (i=0 ;i < n ;i++ ){
      |                       ^
a.cc:24:25: error: 'n' was not declared in this scope
   24 |         double m = sum/ n ;//??????
      |                         ^
Language: C++

#include <iostream>
#include <cstdio>
#include <cmath>
 
using namespace std;
 
int main() {
    while (1) {
        int n;
        cin >> n;
        if (n == 0) {
            break;
        }
 
        int s[1000];
        double total = 0;
        for (int i = 0; i < n; i++) {
            cin >> s[i];
            total += s[i];
        }
 
        double m = total / n;
 
        double a_2 = 0;
        for (int i = 0; i < n; i++) {
            a_2 += (s[i] - m)*(s[i] - m) / n;
        }
 
        double a = sqrt(a_2);
        printf("%.4f\n", a);
        return 0;
}

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

#include <iostream>
#include <cstdio>
#include <cmath>
 
using namespace std;
 
int main() {
    while (1) {
        int n;
        cin >> n;
        if (n == 0) {
            break;
        }
 
        int s[1000];
        double total = 0;
        for (int i = 0; i < n; i++) {
            cin >> s[i];
            total += s[i];
        }
 
        double m = total / n;
 
        double a_2 = 0;
        for (int i = 0; i < n; i++) {
            a_2 += (s[i] - m)*(s[i] - m) / n;
        }
 
        double a = sqrt(a_2);
        printf("%.4f\n", a);
 
    return 0;
}

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

#include <iostream>
#include <cstdio>
#include <cmath>
 
using namespace std;
 
int main() 
{
    while (1) {
        int n;
        cin >> n;
        if (n == 0) {
            break;
        }
    }
 
        int s[1000];
        double total = 0;
        for (int i = 0; i < n; i++) {
            cin >> s[i];
            total += s[i];
        }
 
        double m = total / n;
 
        double a_2 = 0;
        for (int i = 0; i < n; i++) {
            a_2 += (s[i] - m)*(s[i] - m) / n;
        }
 
        double a = sqrt(a_2);
        printf("%.4f\n", a);
 
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:29: error: 'n' was not declared in this scope
   19 |         for (int i = 0; i < n; i++) {
      |                             ^
a.cc:24:28: error: 'n' was not declared in this scope
   24 |         double m = total / n;
      |                            ^
Language: C++

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

double StandardDeviation(vector<int> s){
	int n = s.size();
	double S = 0;
	double D = 0;
	for(int i = 0; i < n; i++) S += s[i];
	double m = S / n;
	for(int i = 0; i < n; i++) D += (s[i] - m) * (s[i] - m);
	double d = sqrt( D / n );
	return d;
}

vector<int> Enter(int n){
	vector<int> s;
	for(int i = 0; i < n; i++){
		int a;
		cin >> a;
		s.push_back(a);
	}
	return s;
}

int main(){
	vector<double> alpha;
	while(1){
		int n;
		cin >> n;
		if(n == 0) break;
		vector<int> s;
		s = Enter(n);
		double d = StandardDeviation(s);
		alpha.push_back(d);
	}
	for(int i = 0; i < alpha.size(); i++){
		cout << fixed << setprecision(8) << alpha[i] << endl;
	}
	return 0;
}

Compiler output:
a.cc:6:26: error: 'vector' was not declared in this scope
    6 | double StandardDeviation(vector<int> s){
      |                          ^~~~~~
a.cc:4:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    3 | #include<cmath>
  +++ |+#include <vector>
    4 | using namespace std;
a.cc:6:33: error: expected primary-expression before 'int'
    6 | double StandardDeviation(vector<int> s){
      |                                 ^~~
a.cc:17:1: error: 'vector' does not name a type
   17 | vector<int> Enter(int n){
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:28:9: error: 'vector' was not declared in this scope
   28 |         vector<double> alpha;
      |         ^~~~~~
a.cc:28:9: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
a.cc:28:16: error: expected primary-expression before 'double'
   28 |         vector<double> alpha;
      |                ^~~~~~
a.cc:33:24: error: expected primary-expression before 'int'
   33 |                 vector<int> s;
      |                        ^~~
a.cc:34:17: error: 's' was not declared in this scope
   34 |                 s = Enter(n);
      |                 ^
a.cc:34:21: error: 'Enter' was not declared in this scope
   34 |                 s = Enter(n);
      |                     ^~~~~
a.cc:35:45: error: 'StandardDeviation' cannot be used as a function
   35 |                 double d = StandardDeviation(s);
      |                            ~~~~~~~~~~~~~~~~~^~~
a.cc:36:17: error: 'alpha' was not declared in this scope; did you mean 'isalpha'?
   36 |                 alpha.push_back(d);
      |                 ^~~~~
      |                 isalpha
a.cc:38:28: error: 'alpha' was not declared in this scope; did you mean 'isalpha'?
   38 |         for(int i = 0; i < alpha.size(); i++){
      |                            ^~~~~
      |                            isalpha
Language: C++

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

using namespace std;

int main(){
	int n, s, s[1000];
	
	while(1){
		cin >> n;
		
		if(n == 0) break;
		
		int s_total = 0;
		
		for(int i = 0;i < n; i++){
			cin >> s;
			s[i] = s;
			s_total += s; 
		}
		
		int s_ave = s_total / n; 
		
		int sum = 0;
		
		for(int i = 0;i < n; i++){
			r = (s[i]-s_ave)*(s[i]-s_ave);
			sum += r;
		}
		
		cout << sqrt(sum / n) << endl;
		
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: conflicting declaration 'int s [1000]'
    8 |         int n, s, s[1000];
      |                   ^
a.cc:8:16: note: previous declaration as 'int s'
    8 |         int n, s, s[1000];
      |                ^
a.cc:19:26: error: invalid types 'int[int]' for array subscript
   19 |                         s[i] = s;
      |                          ^
a.cc:28:25: error: 'r' was not declared in this scope
   28 |                         r = (s[i]-s_ave)*(s[i]-s_ave);
      |                         ^
a.cc:28:31: error: invalid types 'int[int]' for array subscript
   28 |                         r = (s[i]-s_ave)*(s[i]-s_ave);
      |                               ^
a.cc:28:44: error: invalid types 'int[int]' for array subscript
   28 |                         r = (s[i]-s_ave)*(s[i]-s_ave);
      |                                            ^
Language: C++

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

using namespace std;

int main(){
	int n, s;
	int s[1000] ={0};
	
	while(1){
		cin >> n;
		
		if(n == 0) break;
		
		int s_total = 0;
		
		for(int i = 0;i < n; i++){
			cin >> s;
			s[i] = s;
			s_total += s; 
		}
		
		int s_ave = s_total / n; 
		
		int sum = 0;
		
		for(int i = 0;i < n; i++){
			r = (s[i]-s_ave)*(s[i]-s_ave);
			sum += r;
		}
		
		cout << sqrt(sum / n) << endl;
		
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: conflicting declaration 'int s [1000]'
    9 |         int s[1000] ={0};
      |             ^
a.cc:8:16: note: previous declaration as 'int s'
    8 |         int n, s;
      |                ^
a.cc:20:26: error: invalid types 'int[int]' for array subscript
   20 |                         s[i] = s;
      |                          ^
a.cc:29:25: error: 'r' was not declared in this scope
   29 |                         r = (s[i]-s_ave)*(s[i]-s_ave);
      |                         ^
a.cc:29:31: error: invalid types 'int[int]' for array subscript
   29 |                         r = (s[i]-s_ave)*(s[i]-s_ave);
      |                               ^
a.cc:29:44: error: invalid types 'int[int]' for array subscript
   29 |                         r = (s[i]-s_ave)*(s[i]-s_ave);
      |                                            ^
Language: C++

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

using namespace std;

int main(){
	int n, s;
	int score[1000] ={0};
	
	while(1){
		cin >> n;
		
		if(n == 0) break;
		
		int s_total = 0;
		
		for(int i = 0;i < n; i++){
			cin >> s;
			score[i] = s;
			s_total += s; 
		}
		
		int s_ave = s_total / n; 
		
		int sum = 0;
		
		for(int i = 0;i < n; i++){
			r = (score[i]-s_ave)*(score[i]-s_ave);
			sum += r;
		}
		
		cout << sqrt(sum / n) << endl;
		
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:25: error: 'r' was not declared in this scope
   29 |                         r = (score[i]-s_ave)*(score[i]-s_ave);
      |                         ^
Language: C++

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

using namespace std;

int main(){
	int n, s;
	double r;
	int score[1000] = {0};
	
	while(1){
		cin >> n;
		
		if(n == 0) break;
		
		int s_total = 0;
		
		for(int i = 0;i < n; i++){
			cin >> s;
			score[i] = s;
			s_total += s; 
		}
		
		double s_ave = s_total / n; 
		
		double sum = 0;
		
		for(int i = 0;i < n; i++){
			r = (score[i]-s_ave)*(score[i]-s_ave);
			sum += r;
		}
		
		cout << fixed << precision(8) << sqrt(sum / n) << endl;
		
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:34: error: 'precision' was not declared in this scope
   34 |                 cout << fixed << precision(8) << sqrt(sum / n) << endl;
      |                                  ^~~~~~~~~
Language: C++

#include <iostream>
#include <cmath>
#include <cstdio>

using namespace std;

int main(){
	
	while(1){
		int n;
		cin >> n;
		
		if(n == 0) break;
		
		int score[n];
		double s_total = 0;
		
		for(int i = 0;i < n; i++){
			cin >> score[i];
			s_total += score[i]; 
		}
		double s_ave = s_total / n; 
		
		double sum = 0;
		for(int i = 0;i < n; i++){
			sum += (score[i] - s_ave) * (score[i] - s_ave);
		}
		double ans = sqrt(sum / n);
		
		cout << fixed << setprecision(5) << ans << endl;
		
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:34: error: 'setprecision' was not declared in this scope
   30 |                 cout << fixed << setprecision(5) << ans << endl;
      |                                  ^~~~~~~~~~~~
a.cc:4:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
    3 | #include <cstdio>
  +++ |+#include <iomanip>
    4 |
Language: C++

#include<iostream>
#include<stdio.h>

using namespace std;

int main() {
	while (true) {
		int n;
		int s[1001];
		double m = 0.0f;
		double a = 0.0f;

		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 = sqrt(a / n);

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

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

#include <iostream>
#include <cmath>

#define MAX_SIZE (1000)
#define MAX_SET  (1000)

int main()
{
    int n;
    int size;
          
    double* alpha = new double[MAX_SIZE];
    
    for (int i = 0; i < MAX_SIZE; i++) {      
         do {
             cin >> n;
         } while (n > MAX_SET);
         
         if (n == 0) {
	     break;
         } else {      
             int* s = new int[n];       	    
             int  sum = 0;
             int  sum_sq = 0;

	     for (int j = 0; j < n; j++) {
	          do {
	              cin >> s[j];
		  } while (s[j] < 0 || s[j] > 100);
            
                  sum += s[j];
                  sum_sq += s[j] * s[j];                  
             }

             alpha[i] = sqrt((double)sum_sq / n - pow((double)sum / n, 2));
             
             delete[] s;       
          }         
    }

    size = i;

    for (int i = 0; i < size; i++) {
         cout << setprecision(8) << alpha << endl;         
    }

    delete[] alpha;
    
    return (0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:14: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   16 |              cin >> n;
      |              ^~~
      |              std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:28:23: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   28 |                       cin >> s[j];
      |                       ^~~
      |                       std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:41:12: error: 'i' was not declared in this scope
   41 |     size = i;
      |            ^
a.cc:44:10: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   44 |          cout << setprecision(8) << alpha << endl;
      |          ^~~~
      |          std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:44:18: error: 'setprecision' was not declared in this scope
   44 |          cout << setprecision(8) << alpha << endl;
      |                  ^~~~~~~~~~~~
a.cc:44:46: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   44 |          cout << setprecision(8) << alpha << endl;
      |                                              ^~~~
      |                                              std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>
#include <iomanip>
#include <cmath>

#define MAX_SIZE (1000)
#define MAX_SET  (1000)

using namespace std;

int main()
{
    int n;
    int size;
          
    double* alpha = new double[MAX_SIZE];
    
    for (int i = 0; i < MAX_SIZE; i++) {      
         do {
             cin >> n;
         } while (n > MAX_SET);
         
         if (n == 0) {
	     break;
         } else {      
             int* s = new int[n];       	    
             int  sum = 0;
             int  sum_sq = 0;

	     for (int j = 0; j < n; j++) {
	          do {
	              cin >> s[j];
		  } while (s[j] < 0 || s[j] > 100);
            
                  sum += s[j];
                  sum_sq += s[j] * s[j];                  
             }

             alpha[i] = sqrt((double)sum_sq / n - pow((double)sum / n, 2));
             
             delete[] s;       
          }         
    }

    size = i;

    for (int i = 0; i < size; i++) {
         cout << setprecision(8) << alpha << endl;         
    }

    delete[] alpha;
    
    return (0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:44:12: error: 'i' was not declared in this scope
   44 |     size = i;
      |            ^
Language: C++

5
70 80 100 90 20
3
80 80 80
1
100
1
50
1
0
10
0 0 0 0 0 0 0 0 0 0
10
1 34 44 63 30 1 9 53 57 57
10
20 12 52 44 6 9 94 31 67 70
0

Compiler output:
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 5
      | ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:6: error: expected initializer before 'sin'
    8 |      sin>>n;
      |      ^~~
a.cc:15:27: error: 'a' was not declared in this scope
   15 |      for(int i=0;i<n;i++) a+=(m-s[i])(m-s[i])/n;
      |                           ^
a.cc:15:38: error: expression cannot be used as a function
   15 |      for(int i=0;i<n;i++) a+=(m-s[i])(m-s[i])/n;
      |                              ~~~~~~~~^~~~~~~~
a.cc:16:17: error: 'a' was not declared in this scope
   16 |      cout<<sqrt(a)<<endl;
      |                 ^
a.cc:16:26: error: expected '}' at end of input
   16 |      cout<<sqrt(a)<<endl;
      |                          ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:6: error: expected initializer before 'sin'
    8 |      sin>>n;
      |      ^~~
a.cc:15:27: error: 'a' was not declared in this scope
   15 |      for(int i=0;i<n;i++) a+=(m-s[i])(m-s[i])/n;
      |                           ^
a.cc:15:38: error: expression cannot be used as a function
   15 |      for(int i=0;i<n;i++) a+=(m-s[i])(m-s[i])/n;
      |                              ~~~~~~~~^~~~~~~~
a.cc:16:17: error: 'a' was not declared in this scope
   16 |      cout<<sqrt(a)<<endl;
      |                 ^
Language: C++

#include<iostream>
#include<cmath>
using namespace std;
 
int main(){
     int n,sum;
     double m,a
     cin>>n;
     int s[n];
     for(int i=0;i<n;i++){
          cin>>s[i];
          sum+=s[i];
     }
     m=sum/n;
     for(int i=0;i<n;i++) a+=(m-s[i])(m-s[i])/n;
     cout<<sqrt(a)<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:6: error: expected initializer before 'cin'
    8 |      cin>>n;
      |      ^~~
a.cc:15:27: error: 'a' was not declared in this scope
   15 |      for(int i=0;i<n;i++) a+=(m-s[i])(m-s[i])/n;
      |                           ^
a.cc:15:38: error: expression cannot be used as a function
   15 |      for(int i=0;i<n;i++) a+=(m-s[i])(m-s[i])/n;
      |                              ~~~~~~~~^~~~~~~~
a.cc:16:17: error: 'a' was not declared in this scope
   16 |      cout<<sqrt(a)<<endl;
      |                 ^
Language: C++

#include<iostream>
#include<cmath>
using namespace std;
 
int main(){
     int n,sum;
     double m,a;
     cin>>n;
     int s[n];
     for(int i=0;i<n;i++){
          cin>>s[i];
          sum+=s[i];
     }
     m=sum/n;
     for(int i=0;i<n;i++) a+=(m-s[i])(m-s[i])/n;
     cout<<sqrt(a)<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:38: error: expression cannot be used as a function
   15 |      for(int i=0;i<n;i++) a+=(m-s[i])(m-s[i])/n;
      |                              ~~~~~~~~^~~~~~~~
Language: C++

#include<iostream>
#include<cmath>
using namespace std;
 
int main(){
     int n,sum;
     double m,a;
     while(1){
     cin>>n;
     if(n==0) break;
     int s[n];
     for(int i=0;i<n;i++){
          cin>>s[i];
          sum+=s[i];
     }
     m=sum/n;
     for(int i=0;i<n;i++) a+=(m-s[i])*(m-s[i])/n;
     cout<<sqrt(a)<<endl;
}

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

#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;
int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n;
    int* s;
    while (cin >> n && n > 0) {
        s = new int[n];
        int t = 0;
        for (int i = 0; i < n; i++) {
            cin >> s[i];
            t += s[i];
        }
        double m = t / n;
        double u = 0;
        for (int i = 0; i < n; i++) {
            u += (s[i] - m) * (s[i] - m);
        }
        cout << fixed << setpredision(8) << sqrt(u/n) << "\n";
        delete s;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:26: error: 'setpredision' was not declared in this scope
   22 |         cout << fixed << setpredision(8) << sqrt(u/n) << "\n";
      |                          ^~~~~~~~~~~~
Language: C++

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

int main(){
  int n, A[1000];

  while (1) {
    cin >> n;
    if (n == 0) break;
    int sum = 0;
    for (int i = 0; i < n; i++) cin >> A[i]; sum += A[i];
    double avg = 1.0*sum/n;
    double dist = 0;
    for (int i = 0; i < n; i++){
      dist += (avg - A[i])*(avg - A[i]);
    }

    printf("%lf\n", sqrt(dist/n));
  }

return 0;
}
0

Compiler output:
a.cc: In function 'int main()':
a.cc:13:55: error: 'i' was not declared in this scope
   13 |     for (int i = 0; i < n; i++) cin >> A[i]; sum += A[i];
      |                                                       ^
a.cc: At global scope:
a.cc:25:1: error: expected unqualified-id before numeric constant
   25 | 0
      | ^
Language: C++

#include <iostream>
using namespace std;

int main(){
	while(1)
		double n,s[100],ans=0;
		cin>>n;
		if(n==0)
			break;
		for(int i=0;i<n;i++){
			cin>>s[i];
			ans += s[i];
		}
		cout<<ans/n<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: 'n' was not declared in this scope
    7 |                 cin>>n;
      |                      ^
a.cc:9:25: error: break statement not within loop or switch
    9 |                         break;
      |                         ^~~~~
a.cc:11:30: error: 's' was not declared in this scope
   11 |                         cin>>s[i];
      |                              ^
a.cc:12:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
   12 |                         ans += s[i];
      |                         ^~~
      |                         abs
a.cc:14:23: error: 'ans' was not declared in this scope; did you mean 'abs'?
   14 |                 cout<<ans/n<<endl;
      |                       ^~~
      |                       abs
Language: C++

#include <iostream>
using namespace std;

int main(){
	while(1)
		double n,s[100],ans=0;
		cin>>n;
		if(n==0)
			break;
		for(int i=0;i<n;i++){
			cin>>s[i];
			ans += s[i];
		}
		cout<<fixed<<setprecition(5)<<ans/n<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: 'n' was not declared in this scope
    7 |                 cin>>n;
      |                      ^
a.cc:9:25: error: break statement not within loop or switch
    9 |                         break;
      |                         ^~~~~
a.cc:11:30: error: 's' was not declared in this scope
   11 |                         cin>>s[i];
      |                              ^
a.cc:12:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
   12 |                         ans += s[i];
      |                         ^~~
      |                         abs
a.cc:14:30: error: 'setprecition' was not declared in this scope
   14 |                 cout<<fixed<<setprecition(5)<<ans/n<<endl;
      |                              ^~~~~~~~~~~~
a.cc:14:47: error: 'ans' was not declared in this scope; did you mean 'abs'?
   14 |                 cout<<fixed<<setprecition(5)<<ans/n<<endl;
      |                                               ^~~
      |                                               abs
Language: C++

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

int main(){
	while(1)
		double n,s[100],ans=0;
		cin>>n;
		if(n==0)
			break;
		for(int i=0;i<n;i++){
			cin>>s[i];
			ans += s[i];
		}
		cout<<fixed<<setprecition(5)<<ans/n<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: 'n' was not declared in this scope
    8 |                 cin>>n;
      |                      ^
a.cc:10:25: error: break statement not within loop or switch
   10 |                         break;
      |                         ^~~~~
a.cc:12:30: error: 's' was not declared in this scope
   12 |                         cin>>s[i];
      |                              ^
a.cc:13:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
   13 |                         ans += s[i];
      |                         ^~~
      |                         abs
a.cc:15:30: error: 'setprecition' was not declared in this scope
   15 |                 cout<<fixed<<setprecition(5)<<ans/n<<endl;
      |                              ^~~~~~~~~~~~
a.cc:15:47: error: 'ans' was not declared in this scope; did you mean 'abs'?
   15 |                 cout<<fixed<<setprecition(5)<<ans/n<<endl;
      |                                               ^~~
      |                                               abs
Language: C++

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

int main(){
	while(1){
		double n,s[100],ans=0;
		cin>>n;
		if(n==0)
			break;
		for(int i=0;i<n;i++){
			cin>>s[i];
			ans += s[i];
		}
		cout<<fixed<<setprecition(5)<<ans/n<<endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:30: error: 'setprecition' was not declared in this scope
   15 |                 cout<<fixed<<setprecition(5)<<ans/n<<endl;
      |                              ^~~~~~~~~~~~
Language: C++

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

int main(){
 int n,m,sum;
 double a;
 while(1){
  cin >> n;
  int s[n]={};
  if(n==0) break;

  sum=0;
  for(int i=0;i<n;++i){
   cin >> s[i];
   sum+=s[i];
  }
  m=sum/n;

  a=0
  for(int i=0;i<n;++i){
   a+=pow(s[i]-m,2)
  }
  cout << fixed << setprecision(8) << fabs(sqrt(a/n)) << endl
 }
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:6: error: expected ';' before 'for'
   21 |   a=0
      |      ^
      |      ;
   22 |   for(int i=0;i<n;++i){
      |   ~~~ 
a.cc:22:15: error: 'i' was not declared in this scope
   22 |   for(int i=0;i<n;++i){
      |               ^
a.cc:25:62: error: expected ';' before '}' token
   25 |   cout << fixed << setprecision(8) << fabs(sqrt(a/n)) << endl
      |                                                              ^
      |                                                              ;
   26 |  }
      |  ~
Language: C++

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

int main(){
 int n,m,sum;
 double a;
 while(1){
  cin >> n;
  int s[n]={};
  if(n==0) break;

  sum=0;
  for(int i=0;i<n;++i){
   cin >> s[i];
   sum+=s[i];
  }
  m=sum/n;

  a=0;
  for(int i=0;i<n;++i){
   a+=pow(s[i]-m,2);
  }
  a=sqrt(a/n)
  cout << fixed << setprecision(8) << fabs(a) << endl ;
 }
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:14: error: expected ';' before 'cout'
   25 |   a=sqrt(a/n)
      |              ^
      |              ;
   26 |   cout << fixed << setprecision(8) << fabs(a) << endl ;
      |   ~~~~
Language: C++

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

int main(){
 int n,m,sum;
 double a;
 while(1){
  cin >> n;
  int s[n]={};
  if(n==0) break;

  sum=0;
  for(int i=0;i<n;++i){
   cin >> s[i];
   sum+=s[i];
  }
  m=sum/n;

  a=0;
  for(int i=0;i<n;++i){
   a+=pow(s[i]-m,2);
  }
  a/=n 
  a=sqrt(a);
  cout << fixed << setprecision(8) << a << endl ;
 }
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:7: error: expected ';' before 'a'
   25 |   a/=n
      |       ^
      |       ;
   26 |   a=sqrt(a);
      |   ~
Language: C++

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

int main(){
 double n,m,sum;
 double a;
 while(1){
  cin >> n;
  int s[n]={};
  if(n==0) break;

  sum=0;
  for(int i=0;i<n;++i){
   cin >> s[i];
   sum+=s[i];
  }
  m=sum/n;

  a=0;
  for(int i=0;i<n;++i){
   a+=pow(s[i]-m,2);
  }
  a=sqrt(a/n);
  cout << fixed << setprecision(8) << a << endl ;
 }
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
   11 |   int s[n]={};
      |         ^
a.cc:11:9: error: could not convert 'n' from 'double' to 'long unsigned int'
   11 |   int s[n]={};
      |         ^
      |         |
      |         double
a.cc:11:9: error: size of array 's' has non-integral type 'double'
Language: C++

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

int main(int argc, char const *argv[])
{
  while(1)
  {
    int n;
    cin >> n;
    if(n == 0) break;

    vector<int> s(n);
    for(int i = 0; i < n: i++)
      cin >> s[i];
      
    double m = 0;
    for(int i = 0; i < n; i++)
      m += s[i];
    m /= n;

    double a2 = 0;
    for(int i = 0; i < n; i++)
      a2 += (s[i] - m)*(s[i] - m) / n;

    cout << fixed << setprecision(10) << sqrt(a2) << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:13:20: warning: range-based 'for' loops with initializer only available with '-std=c++20' or '-std=gnu++20' [-Wc++20-extensions]
   13 |     for(int i = 0; i < n: i++)
      |                    ^
a.cc:13:25: error: found ':' in nested-name-specifier, expected '::'
   13 |     for(int i = 0; i < n: i++)
      |                         ^
      |                         ::
a.cc:13:24: error: 'n' is not a class, namespace, or enumeration
   13 |     for(int i = 0; i < n: i++)
      |                        ^
a.cc:17:5: error: expected primary-expression before 'for'
   17 |     for(int i = 0; i < n; i++)
      |     ^~~
a.cc:16:18: error: expected ')' before 'for'
   16 |     double m = 0;
      |                  ^
      |                  )
   17 |     for(int i = 0; i < n; i++)
      |     ~~~           
a.cc:13:8: note: to match this '('
   13 |     for(int i = 0; i < n: i++)
      |        ^
a.cc:19:5: error: 'm' was not declared in this scope
   19 |     m /= n;
      |     ^
Language: C++

#include<iostream>
using namespace std;
int main(){
	int n,s[100];
	while(1){
		int a=0;
		cin>>n;
		if(n==0)break;
		for(int i=0;i<n;i++){
			cin>>s[i];
			a+=s[i];
		}
		double b=a/n;
		double c=0;
		for(int i=0;i<n;i++){
			c+=pow(b-s[i],2.0);
		}
		double d=0;
		d=sqrt(c/n);
		cout<<d<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:28: error: 'pow' was not declared in this scope
   16 |                         c+=pow(b-s[i],2.0);
      |                            ^~~
a.cc:19:19: error: 'sqrt' was not declared in this scope
   19 |                 d=sqrt(c/n);
      |                   ^~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
	int n,s[100];
	while(1){
		int a=0;
		cin>>n;
		if(n==0)break;
		for(int i=0;i<n;i++){
			cin>>s[i];
			a+=s[i];
		}
		double b=a/n;
		double c=0;
		for(int i=0;i<n;i++){
			c+=pow(b-s[i],2.0);
		}
		double d=0;
		d=sqrt(c/n);
		printf("%.7f",d);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:28: error: 'pow' was not declared in this scope
   16 |                         c+=pow(b-s[i],2.0);
      |                            ^~~
a.cc:19:19: error: 'sqrt' was not declared in this scope
   19 |                 d=sqrt(c/n);
      |                   ^~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
	int n,s[100];
	while(1){
		int a=0;
		cin>>n;
		if(n==0)break;
		for(int i=0;i<n;i++){
			cin>>s[i];
			a+=s[i];
		}
		double b=a/n;
		double c=0;
		for(int i=0;i<n;i++){
			c+=pow(b-s[i],2.0);
		}
		double d=0;
		d=sqrt(c/n);
		printf("%0.6f\n",d);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:28: error: 'pow' was not declared in this scope
   16 |                         c+=pow(b-s[i],2.0);
      |                            ^~~
a.cc:19:19: error: 'sqrt' was not declared in this scope
   19 |                 d=sqrt(c/n);
      |                   ^~~~
Language: C++

#include<iostream>
#include<cstdio>
using namespace std;
int main(){
	int n,s[100];
	while(1){
		int a=0;
		cin>>n;
		if(n==0)break;
		for(int i=0;i<n;i++){
			cin>>s[i];
			a+=s[i];
		}
		double b=a/n;
		double c=0;
		for(int i=0;i<n;i++){
			c+=pow(b-s[i],2.0);
		}
		double d=0;
		d=sqrt(c/n);
		printf("%0.6f\n",d);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:28: error: 'pow' was not declared in this scope
   17 |                         c+=pow(b-s[i],2.0);
      |                            ^~~
a.cc:20:19: error: 'sqrt' was not declared in this scope
   20 |                 d=sqrt(c/n);
      |                   ^~~~
Language: C++

#include<iostream>
#include<cstdio>
using namespace std;
int main(){
	int n,s[100];
	while(1){
		int a=0;
		cin>>n;
		if(n==0)break;
		for(int i=0;i<n;i++){
			cin>>s[i];
			a+=s[i];
		}
		double b=a/n;
		double c=0;
		for(int i=0;i<n;i++){
			c+=pow(b-s[i],2.0);
		}
		double d=0;
		d=sqrt(c/n);
		printf("%.6f\n",d);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:28: error: 'pow' was not declared in this scope
   17 |                         c+=pow(b-s[i],2.0);
      |                            ^~~
a.cc:20:19: error: 'sqrt' was not declared in this scope
   20 |                 d=sqrt(c/n);
      |                   ^~~~
Language: C++

import java.io.*;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();
        int n;

        while(true){
            n = Integer.parseInt(br.readLine());
            if(n == 0){
                break;
            }

            String[] str = br.readLine().split(" ");
            int sum = 0;
            double ave = 0;
            double alpha = 0;
            int[] line = new int[n];
            for(int i = 0; i < n; i++){
                line[i] = Integer.parseInt(str[i]);
                sum += line[i];
            }
            ave = sum/n;

            for(int i = 0; i < n; i++){
                alpha += Math.pow((line[i]-ave), 2);
            }
            alpha /= n;
            sb.append(Math.sqrt(alpha)).append("\n");
        }
        System.out.print(sb);
    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C++

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

int main()
{
		float n, m, i, j, sum, a, SUM;
		float s[1001];
		while (1) {
				sum=0;
				SUM=0;
				cin >> n;
				if (n==0) break;
				for (i=0; i<n; i++) cin >> s[i];
				for (i=0; i<n; i++) sum += s[i];
				m = sum/n;
				for (i=0; i<n; i++) SUM += (s[i]-m)*(s[i]-m);
				cout << fixed << sqrt(SUM/n) << "\n";
		}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:61: error: invalid types 'float [1001][float]' for array subscript
   14 |                                 for (i=0; i<n; i++) cin >> s[i];
      |                                                             ^
a.cc:15:61: error: invalid types 'float [1001][float]' for array subscript
   15 |                                 for (i=0; i<n; i++) sum += s[i];
      |                                                             ^
a.cc:17:62: error: invalid types 'float [1001][float]' for array subscript
   17 |                                 for (i=0; i<n; i++) SUM += (s[i]-m)*(s[i]-m);
      |                                                              ^
a.cc:17:71: error: invalid types 'float [1001][float]' for array subscript
   17 |                                 for (i=0; i<n; i++) SUM += (s[i]-m)*(s[i]-m);
      |                                                                       ^
Language: C++

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

int main() {
    int n,sum,m;
    int score[1000]={0};
    double a2;

    while (true){
        cout << fixed << setprecision(8)
        cin >> n;
        m=0;
        sum=0;
        a2=0;
        if (n==0) break;

        for (int i=0; i<n; i++) {
            cin >> score[i];
            sum += score[i];
        }
        m = (double)sum/n;
        for(int j=0; j<n; j++) {
            a2+=(score[j]-m)*(score[j]-m)/n;
        }
        
        a2 = sqrt(a2);
//        double result = sqrt(a2);
//        printf("%f\n",result);

        cout << a2 << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:41: error: expected ';' before 'cin'
   13 |         cout << fixed << setprecision(8)
      |                                         ^
      |                                         ;
   14 |         cin >> n;
      |         ~~~