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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int n;
  cin >> n;
  vector<pair<float,string>> m(n);
  for (int i = 0; i < n; i++) {
    cin >> m[i].first >> m[i].second;
  }
  const float b2y = 380000.0;
  float sum =0;
  for (int i=0; i<n; i++) {
    if (m[i].second =="BTC"){
      sum += m[i].first * b2c;
    }else {
      sum += m[i].first;
    }
    cout << sum;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:27: error: 'b2c' was not declared in this scope; did you mean 'b2y'?
   15 |       sum += m[i].first * b2c;
      |                           ^~~
      |                           b2y
a.cc:20:2: error: expected '}' at end of input
   20 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include<iostream>
#include<string>

using namespace std;

int main(){
  int n,x;
  int i,j=0;
  double b;
  string s;
  
  cin>>n;
  
  for(i=0;i<n;i++){
    cin>>x>>s;
    if(s='JPY')
      j+=x;
    else
      b+=x;
  }
  cout<<j+b*38000.0<<endl;
  return 0;
}

Compiler output:
a.cc:16:10: warning: multi-character character constant [-Wmultichar]
   16 |     if(s='JPY')
      |          ^~~~~
a.cc: In function 'int main()':
a.cc:16:10: warning: overflow in conversion from 'int' to 'char' changes value from '4870233' to '89' [-Woverflow]
a.cc:16:9: error: could not convert 's.std::__cxx11::basic_string<char>::operator=(89)' from 'std::__cxx11::basic_string<char>' to 'bool'
   16 |     if(s='JPY')
      |        ~^~~~~~
      |         |
      |         std::__cxx11::basic_string<char>
Language: C++

#include<iostream>
#include<string>

using namespace std;

int main(){
  int n,x;
  int i,j=0;
  double b;
  string s;
  
  cin>>n;
  
  for(i=0;i<n;i++){
    cin>>x>>s;
    if(s="JPY")
      j+=x;
    else
      b+=x;
  }
  cout<<j+b*38000.0<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:9: error: could not convert 's.std::__cxx11::basic_string<char>::operator=(((const char*)"JPY"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   16 |     if(s="JPY")
      |        ~^~~~~~
      |         |
      |         std::__cxx11::basic_string<char>
Language: Java

import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n=sc.nextInt();
    double[] money = new int[n];
    String[] syurui = new String[n];
    double sum = 0.0;
    for(int i=0; i<n; i++){
      money[i] = sc.nextInt();
      syurui[i] = sc.next();
      if(syurui[i] = "BTC"){
        sum += money[i] * 380000.0;
      }else{
        sum += money[i];
      }
    }
    System.out.println(sum);
  }
}

Compiler output:
Main.java:6: error: incompatible types: int[] cannot be converted to double[]
    double[] money = new int[n];
                     ^
Main.java:12: error: incompatible types: String cannot be converted to boolean
      if(syurui[i] = "BTC"){
                   ^
2 errors
Language: C++

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

int main(){
  int N;
  cin >> N;
  double ans;
  double x;
  string u;
  for (int i;i<N;i++){
    cin >>x>>u;
    ans=u=="JPY"?ans+x:ans+x*380000.0
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:38: error: expected ';' before '}' token
   12 |     ans=u=="JPY"?ans+x:ans+x*380000.0
      |                                      ^
      |                                      ;
   13 |   }
      |   ~
Language: C

#include <stdio.h>
int main (void)
{
        int i,n;
        double x[11],sum;
        char u[11],BTC,JPY;

        scanf("%d",n);

        sum = x[0];

        for (i=0; i<n; i++){

        scanf("%lf %c",x[n],u[n]);

        if(0.00000001 <= x[i] <= 100.00000000){
                sum += x[i] * 380000.0;
        }

        else(1 <= x[i] <= 100000000){
                sum += x[i];
        }

        printf("%lf",sum);

        return 0;
}                                               10,14        全て

Compiler output:
main.c: In function 'main':
main.c:20:37: error: expected ';' before '{' token
   20 |         else(1 <= x[i] <= 100000000){
      |                                     ^
      |                                     ;
main.c:27:54: error: expected ';' before '\U00005168\U00003066'
   27 | }                                               10,14        全て
      |                                                      ^       ~~~~
      |                                                      ;
main.c:27:1: error: expected declaration or statement at end of input
   27 | }                                               10,14        全て
      | ^
Language: C

#include <stdio.h>
int main (void)
{
  int i,n;
  double x[11],sum;
  char u[11],BTC,JPY;

  scanf("%d",n);

  sum = x[0];

    for (i=0; i<n; i++){
      scanf("%d %c",x[n],u[n]);
      if(0.00000001 <= x[i] <= 100.00000000)
        sum += x[i] * 380000.0;
      else(1 <= x[i] <= 100000000)
        sum += x[i];
    }

  printf("%lf",sum);

  return 0;
}
-- 挿入 --                                                    10,14        全て


Compiler output:
main.c: In function 'main':
main.c:16:35: error: expected ';' before 'sum'
   16 |       else(1 <= x[i] <= 100000000)
      |                                   ^
      |                                   ;
   17 |         sum += x[i];
      |         ~~~                        
main.c: At top level:
main.c:24:1: error: expected identifier or '(' before '--' token
   24 | -- 挿入 --                                                    10,14        全て
      | ^~
Language: C++

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

int main(void){
  	int N;
  	vector<double> x;
  	vector<string> u;
  	//input 
  	cin >> N;
  	for(int i=0; i<N; i++){
   		double tmp_x;
      	string tmp_u;
      	cin >> tmp_x >> tmp_u;
      	x.push_back(tmp_x);
      	u.push_back(tmp_u);
    }
  	double ans = 0;
  	for(int i=0; i<N; i++){
    	if(u[i] == "BTC")
        	ans += x[i]*380000.0;
        }else{
          	ans += x[i];
        }
    }
  
  	//compute
  	//output
  	cout << ans << endl;
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:10: error: 'else' without a previous 'if'
   23 |         }else{
      |          ^~~~
a.cc:24:26: error: 'i' was not declared in this scope
   24 |                 ans += x[i];
      |                          ^
a.cc: At global scope:
a.cc:30:9: error: 'cout' does not name a type
   30 |         cout << ans << endl;
      |         ^~~~
a.cc:31:9: error: expected unqualified-id before 'return'
   31 |         return 0;
      |         ^~~~~~
a.cc:32:1: error: expected declaration before '}' token
   32 | }
      | ^
Language: C++

#include<iostream>
#include<vector>
#include<cstdio>
#include<string>
#include<algorithm>
using namespace std;

int ConvStrToInt(std::string checkStr)
{
	return atoi(checkStr.c_str());
}

int ConvStrToInt(char c)
{
	if ('0' <= c && c <= '9') return (c - '0');
	return -1;
}

int main() {
	int N;
	cin >> N;

	std::vector<float> value(N);
	std::vector<string> tani(N);
	for (int i = 0; i < N; ++i)
	{
		cin >> value[i] >> tani[i];
	}

	long float resultValue = 0;
	for (int i = 0; i < N; i++)
	{
		if (tani[i] == "BTC")
		{
			value[i] *= 380000.0f;
		}
		resultValue += value[i];
	}

	cout << resultValue << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:9: error: 'long' specified with 'float'
   30 |         long float resultValue = 0;
      |         ^~~~
Language: C

#include<stdio.h>

int main(void){
  int n,i;
  double x[256],b;
  char u[3];

  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%lf %s",&x,u);
    if(u[0]=='J'){
      b+=x;
    }else{
      x=x*380000.0;
      b+=x;
    }
  }
  printf("%.8f",b);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:8: error: invalid operands to binary + (have 'double' and 'double *')
   12 |       b+=x;
      |        ^~~
      |          |
      |          double *
main.c:14:10: error: invalid operands to binary * (have 'double *' and 'double')
   14 |       x=x*380000.0;
      |         ~^
      |         |
      |         double *
main.c:15:8: error: invalid operands to binary + (have 'double' and 'double *')
   15 |       b+=x;
      |        ^~~
      |          |
      |          double *
Language: C

#include<stdio.h>

int main(void){
  int n;
  double x[256],b;
  char u[3];

  scanf("%d",&n);
  for(i=0;i++;i<n){
    scanf("%lf %s",&x,u);
    if(u[0]='J'){
      b+=x;
    }else{
      x=x*380000.0;
    }
  }
  printf("%lf",b);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:7: error: 'i' undeclared (first use in this function)
    9 |   for(i=0;i++;i<n){
      |       ^
main.c:9:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:8: error: invalid operands to binary + (have 'double' and 'double *')
   12 |       b+=x;
      |        ^~~
      |          |
      |          double *
main.c:14:10: error: invalid operands to binary * (have 'double *' and 'double')
   14 |       x=x*380000.0;
      |         ~^
      |         |
      |         double *
Language: C++

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

int main() {
  int N;
  cin >> N;

  double ans = 0;
  for (int i=0; i<N; i++) {
    double x;
    string u;
    cin >> x >> u;
    if (u == "BTC") {
      ans += x * 380000.0 % 100000000.7;
    } else {
      ans += int(x);
    }
  }
  print ('%.11f\n', ans);  
  return ans;
}

Compiler output:
a.cc:23:10: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
   23 |   print ('%.11f\n', ans);
      |          ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:18:27: error: invalid operands of types 'double' and 'double' to binary 'operator%'
   18 |       ans += x * 380000.0 % 100000000.7;
      |              ~~~~~~~~~~~~ ^ ~~~~~~~~~~~
      |                |            |
      |                double       double
a.cc:23:3: error: 'print' was not declared in this scope; did you mean 'rint'?
   23 |   print ('%.11f\n', ans);
      |   ^~~~~
      |   rint
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <cstdlib>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <stack>
#include <math.h>
#define rep(i, n) for(int i = 0; i < (n); ++i)
using namespace std;
template<class T> inline bool chmax(T& a, T b){ if(a < b) { a=b; return 1; }return 0;}
template<class T> inline bool chmin(T& a, T b){ if(a > b) { a=b; return 1; }return 0;}
const long long INF = 1LL << 60;

// --------write my code!!!!!----------//

int main(){
    int N; cin >> N;
    long long res = 0;
    rep(i,N){
        double double A; cin >> A;
        string s; cin >> s;
        if(s=="JPY") res+=A;
        else res+=A*380000;
    }
    cout << res << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:9: error: two or more data types in declaration of 'A'
   22 |         double double A; cin >> A;
      |         ^~~~~~
a.cc:22:33: error: 'A' was not declared in this scope
   22 |         double double A; cin >> A;
      |                                 ^
Language: C++

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

int main(){
  int N;
  cin >> N;
  vector<double> x(N);
  vector<string> u(N);
  
  for(int i = 0; i < N; i++){
    cin >> x.at(i) >> u.at(i);
  }
  
  double ans = 0;
  
  for(int i = 0; i < N; i++){
    if(u.at(i) == "JPY"){
      ans+= x.at(i);
    }
    else{
      ans += 380000.0 * x.at(i)
    }
  }
  cout << ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:32: error: expected ';' before '}' token
   21 |       ans += 380000.0 * x.at(i)
      |                                ^
      |                                ;
   22 |     }
      |     ~
Language: Java

import java.util.Scanner;
class Main{
  public static void main(String args[]){
    Scanner scan=new Scanner(System.in);
    int N = scan.nextInt();
    double x;
    double sum = 0;
    String str;
    for(int i = 0;i < n; i++){
      x = scan.nextDouble();
      str = scan.next();
      if(str.equals("BTC")) x = x*380000;
      sum = sum+x;
    }
    System.out.println(sum);
  }
}


Compiler output:
Main.java:9: error: cannot find symbol
    for(int i = 0;i < n; i++){
                      ^
  symbol:   variable n
  location: class Main
1 error
Language: C++

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

#define RATE 380000.0
int main(void){
    int N,sum=0;
    cin>>N;
    double x[N];
    string r[N];

    for(int i=0;i<<N;i++){
        cin>>x[i]>>u[i];
        if(u[i]=="JPY")
            sum+=u[i];
        else if(u[i]=="BTC")
            sum+=u[i]*RATE;
    }
    cout<<sum<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:20: error: 'u' was not declared in this scope
   12 |         cin>>x[i]>>u[i];
      |                    ^
Language: C++

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

#define RATE 380000.0
int main(void){
    int N,sum=0;
    cin>>N;
    double x[N];
    string [N];

    for(int i=0;i<<N;i++){
        cin>>x[i]>>u[i];
        if(u[i]=="JPY")
            sum+=u[i];
        else if(u[i]=="BTC")
            sum+=u[i]*RATE;
    }
    cout<<sum<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: structured binding declaration cannot have type 'std::string' {aka 'std::__cxx11::basic_string<char>'}
    9 |     string [N];
      |            ^~~
a.cc:9:12: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:9:13: error: conflicting declaration 'auto N'
    9 |     string [N];
      |             ^
a.cc:6:9: note: previous declaration as 'int N'
    6 |     int N,sum=0;
      |         ^
a.cc:9:15: error: expected initializer before ';' token
    9 |     string [N];
      |               ^
a.cc:12:20: error: 'u' was not declared in this scope
   12 |         cin>>x[i]>>u[i];
      |                    ^
Language: C++

#include <vector>
#include <iostream>
#include <string>


using namespace std;

const double rate = 380000.0f;
int main () 
{
    int count = 0;
    cin >> count;

    for (int i = 0; i< count; i++) {
        string num;
        string unit;
        cin >> num >> unit;

        double result = 0.0f;

        if (unit == "JPY") {
            result += atoi(num.c_str());
        }
        else if (unit == "TBC") {
            result += (atof(num.c_str()) * rate);
        }
    }

    cout << result;
    return 0;    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:13: error: 'result' was not declared in this scope
   29 |     cout << result;
      |             ^~~~~~
Language: C++

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

int main(){
  int n;
  cin >> n;
  double x[n];
  string u[n];
  for(int i=0;i<n;i++){
    cin >> x[i] >> u[i];
  }
  double cnt=0;
  for(int i=0;i<n;i++){
    if(u[i]='BTC'){
      cnt+=380000*x[i];
    }else{
      cnt+=x[i];
    }
  }
  cout << cnt << endl;
}


Compiler output:
a.cc:14:13: warning: multi-character character constant [-Wmultichar]
   14 |     if(u[i]='BTC'){
      |             ^~~~~
a.cc: In function 'int main()':
a.cc:14:13: warning: overflow in conversion from 'int' to 'char' changes value from '4346947' to '67' [-Woverflow]
a.cc:14:12: error: could not convert 'u[i].std::__cxx11::basic_string<char>::operator=(67)' from 'std::__cxx11::basic_string<char>' to 'bool'
   14 |     if(u[i]='BTC'){
      |        ~~~~^~~~~~
      |            |
      |            std::__cxx11::basic_string<char>
Language: C++

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

int main(){
  int n;
  cin >> n;
  double x[n];
  string u[n];
  for(int i=0;i<n;i++){
    cin >> x[i] >> u[i];
  }
  double cnt=0;
  for(int i=0;i<n;i++){
    if(u[i]="BTC"){
      cnt+=380000*x[i];
    }else{
      cnt+=x[i];
    }
  }
  cout << cnt << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:12: error: could not convert 'u[i].std::__cxx11::basic_string<char>::operator=(((const char*)"BTC"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   14 |     if(u[i]="BTC"){
      |        ~~~~^~~~~~
      |            |
      |            std::__cxx11::basic_string<char>
Language: C++

#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <string>
#include <algorithm>
#include <cmath>
#include <stack>
#include <queue>
#include <map>
#include <numeric>
#include <type_traits>
#include <limits>
#include <random>
#include <iomanip>

using namespace std;

using ll = long long;

typedef pair<ll, ll> P;

#define rep(i,N) for((long long) i = 0;i < (long long)N; ++i)

static int mod = 1000000007;
static int large_int = 1000000000;
static ll large_ll = 1000000000000000000;

int dx[8] = { 1, -1, 0, 0, 1, 1, -1, -1 };
int dy[8] = { 0, 0, 1, -1, 1, -1, 1, -1 };

int N;
double x;
double ans;
string str;


int main() {
	cin >> N;
	rep(i, N) {
		cin >> x;
		cin >> str;
		if (str == "BTC") {
			ans += x * 380000;
		}
		else {
			ans += x;
		}
	}
	cout << ans << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:38:13: error: 'i' was not declared in this scope
   38 |         rep(i, N) {
      |             ^
a.cc:21:34: note: in definition of macro 'rep'
   21 | #define rep(i,N) for((long long) i = 0;i < (long long)N; ++i)
      |                                  ^
Language: C++

import Control.Monad
import Text.Printf

ret [] sum = sum
ret ((x, u):xs) sum 
  | u == "JPY" = ret xs (sum + x)
  | u == "BTC" = ret xs (sum + x*380000)

main = do
  n <- read <$> getLine
  input <- (replicateM n ((\[x, y] -> (read x, y)) . words <$> getLine)) :: IO [(Double, String)]
  putStrLn $ printf "%.5f" $ ret input 0


Compiler output:
a.cc:11:28: error: stray '\' in program
   11 |   input <- (replicateM n ((\[x, y] -> (read x, y)) . words <$> getLine)) :: IO [(Double, String)]
      |                            ^
a.cc:1:1: error: 'import' does not name a type
    1 | import Control.Monad
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.Scanner;

public void DigitalGifts() throws IOException {
        Scanner sc = new Scanner(System.in);
        int count = sc.nextInt();
        double x = 0.0;
        String u = "";
        double sum = 0;
        for (int i = 0; i < count; i++) {
            x = sc.nextDouble();
            u = sc.nextLine().trim();
            if (u.equals("JPY")) {
                sum += x;
            } else {
                x = x * 380000.0;
                sum += x;
            }
        }
        System.out.println(sum);

    }

Compiler output:
Main.java:8: error: unnamed classes are a preview feature and are disabled by default.
public void DigitalGifts() throws IOException {
       ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: C

    #include<stdio.h>
    #include<string.h>
    int main(void){
    double A,B,C,D,E,N,M,x,y,i,j,cou=0,cou2,v[1000000],w[1000000],min_i,en=0;
        char S[100][100],W[100],s[10],X,Y;
    scanf("%f",&A);
    for(i=0;i<A;i++){
        scanf("%f %s",&v[i],&W[i]);
        if(W[i]=='BTC'){
            en+=v[i]*380000.0;
        }else{
            en+=v[i];
        }
    }
    printf("%f",en);
    return 0;
    }

Compiler output:
main.c: In function 'main':
main.c:8:25: error: array subscript is not an integer
    8 |         scanf("%f %s",&v[i],&W[i]);
      |                         ^
main.c:8:31: error: array subscript is not an integer
    8 |         scanf("%f %s",&v[i],&W[i]);
      |                               ^
main.c:9:13: error: array subscript is not an integer
    9 |         if(W[i]=='BTC'){
      |             ^
main.c:9:18: warning: multi-character character constant [-Wmultichar]
    9 |         if(W[i]=='BTC'){
      |                  ^~~~~
main.c:10:18: error: array subscript is not an integer
   10 |             en+=v[i]*380000.0;
      |                  ^
main.c:12:18: error: array subscript is not an integer
   12 |             en+=v[i];
      |                  ^
Language: C

    #include<stdio.h>
    #include<string.h>
    int main(void){
    double A,B,C,D,E,N,M,x,y,i,j,cou=0,cou2,v[1000000],w[1000000],min_i,en=0;
        char S[100][100],W[100],s[10],X,Y;
    scanf("%lf",&A);
    for(i=0;i<A;i++){
        scanf("%lf %s",&v[i],&W[i]);
        if(W[i]=='BTC'){
            en+=v[i]*380000.0;
        }else{
            en+=v[i];
        }
    }
    printf("%f",en);
    return 0;
    }

Compiler output:
main.c: In function 'main':
main.c:8:26: error: array subscript is not an integer
    8 |         scanf("%lf %s",&v[i],&W[i]);
      |                          ^
main.c:8:32: error: array subscript is not an integer
    8 |         scanf("%lf %s",&v[i],&W[i]);
      |                                ^
main.c:9:13: error: array subscript is not an integer
    9 |         if(W[i]=='BTC'){
      |             ^
main.c:9:18: warning: multi-character character constant [-Wmultichar]
    9 |         if(W[i]=='BTC'){
      |                  ^~~~~
main.c:10:18: error: array subscript is not an integer
   10 |             en+=v[i]*380000.0;
      |                  ^
main.c:12:18: error: array subscript is not an integer
   12 |             en+=v[i];
      |                  ^
Language: C

    #include<stdio.h>
    #include<string.h>
    int main(void){
    double A,B,C,D,E,N,M,x,y,i,j,cou=0,cou2,v[1000000],w[1000000],min_i,en=0;
        char S[100][100],W[100],s[10],X,Y;
    scanf("%lf",&A);
    for(i=0;i<A;i++){
        scanf("%lf %s",&v[i],&W[i]);
        if(W[i]=='BTC'){
            en+=v[i]*380000.0
        }else{
            en+=v[i];
        }
    }
    printf("%f",en);
    return 0;
    }

Compiler output:
main.c: In function 'main':
main.c:8:26: error: array subscript is not an integer
    8 |         scanf("%lf %s",&v[i],&W[i]);
      |                          ^
main.c:8:32: error: array subscript is not an integer
    8 |         scanf("%lf %s",&v[i],&W[i]);
      |                                ^
main.c:9:13: error: array subscript is not an integer
    9 |         if(W[i]=='BTC'){
      |             ^
main.c:9:18: warning: multi-character character constant [-Wmultichar]
    9 |         if(W[i]=='BTC'){
      |                  ^~~~~
main.c:10:18: error: array subscript is not an integer
   10 |             en+=v[i]*380000.0
      |                  ^
main.c:10:30: error: expected ';' before '}' token
   10 |             en+=v[i]*380000.0
      |                              ^
      |                              ;
   11 |         }else{
      |         ~                     
main.c:12:18: error: array subscript is not an integer
   12 |             en+=v[i];
      |                  ^
Language: C++

#include <iosteam>
using namespace std;
int main() {
    int N;
    const int rate = 380000.0;
    cin >> N;
    vector<double, string> gift(N);
    for(int i = 0; i < N; i++) {
        cin >> gift[i][0] >> gift[i][1];
    }
    double sum = 0;

    for(int i = 0; i < N; i++) {
        if(gift[i][1] == "JPY") {
            sum += gift[i][0];
        } else {
            sum += gift[i][0] * rate;
        }
    }
    cout << sum << endl;
    return 0;
}

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

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

int main() {
  int N,x;
  cin >> N;
  string u;
  double sum =0;
  for (int i=0;i<N; i++) {
    cin >> x >> u;
    if (u == "JPY") {
      sum += x;
    }
    else (u == "BTC") {
      sum += x*380000;
    }
  }
  cout << sum << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:14:22: error: expected ';' before '{' token
   14 |     else (u == "BTC") {
      |                      ^~
      |                      ;
a.cc:14:13: warning: ignoring return value of 'bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*) [with _CharT = char; _Traits = char_traits<char>; _Alloc = allocator<char>]', declared with attribute 'nodiscard' [-Wunused-result]
   14 |     else (u == "BTC") {
      |          ~~~^~~~~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:3772:5: note: declared here
 3772 |     operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
Language: C++

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

int main() {
  int N,x;
  cin >> N;
  string u;
  double sum =0;
  for (int i=0;i<N; i++) {
    cin >> x >> y;
    if (u == "JPY") {
      sum += x;
    }
    else (u == "BTC") {
      sum += x*380000;
    }
  }
  cout << sum << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'y' was not declared in this scope
   10 |     cin >> x >> y;
      |                 ^
a.cc:14:22: error: expected ';' before '{' token
   14 |     else (u == "BTC") {
      |                      ^~
      |                      ;
a.cc:14:13: warning: ignoring return value of 'bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*) [with _CharT = char; _Traits = char_traits<char>; _Alloc = allocator<char>]', declared with attribute 'nodiscard' [-Wunused-result]
   14 |     else (u == "BTC") {
      |          ~~~^~~~~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:3772:5: note: declared here
 3772 |     operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
Language: C++

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

int main() {
  int N;
  cin >> N;
  int x;
  cin >> x;
  string u;
  cin >> u;
  double sumj =0;
  for (int i=0;i<N; i++) {
    if (u == JPY) {
      sumj += x;
    }
    cout << sumj << endl;
  }
  double sumb = 0;
  for (int j=0; j<N-i; j++) {
    if (u == BTC) {
      sumb += x*380000.0;
    }
    cout << sumb << endl;
  }
  cout << sumj+sumb << endl;
}
      
      
    
    
  
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:14: error: 'JPY' was not declared in this scope
   13 |     if (u == JPY) {
      |              ^~~
a.cc:19:21: error: 'i' was not declared in this scope
   19 |   for (int j=0; j<N-i; j++) {
      |                     ^
a.cc:20:14: error: 'BTC' was not declared in this scope
   20 |     if (u == BTC) {
      |              ^~~
a.cc: At global scope:
a.cc:33:1: error: expected declaration before '}' token
   33 | }
      | ^
Language: C

#include <stdio.h>

int main() {
  int N, i;
  double money, total = 0;
  char type[4];
  scanf("%d", &N);
  for(i = 0; i < n; i++) {
    scanf("%d %s", &money, type);
    if(strcmp(type, "BTC") == 0) {
      money *= 380000.0;
    }
    total += money;
  }
  printf("%d\n", total);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:18: error: 'n' undeclared (first use in this function)
    8 |   for(i = 0; i < n; i++) {
      |                  ^
main.c:8:18: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:8: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
   10 |     if(strcmp(type, "BTC") == 0) {
      |        ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strcmp'
    1 | #include <stdio.h>
  +++ |+#include <string.h>
    2 |
Language: C++

#include <iostream>
using namespace std
  
int main(){
  double N, x, ans=0.0;
  string u;
  cin >> N;
  for(int i=0; i<N; i++){
    cin >> x >> u;
    if(u=="JPY") ans += x;
    else ans += x*380000.0;
  }
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc:2:20: error: expected ';' before 'int'
    2 | using namespace std
      |                    ^
      |                    ;
    3 | 
    4 | int main(){
      | ~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
  int N;
  float X;
  string U;
  string S =0.0;
 for(int i = 0; i < N; ++i){
   cin >> X >>U;
   if(U == "BTC") S += X*380000;
   else S += X;
 }
  cout << S << endl;  
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: conversion from 'double' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    7 |   string S =0.0;
      |             ^~~
Language: C++

#include<iostream>
using namespace std;
int main(){
  int N;
  float X[10];
  char U[4][10];
  char S =0.0;
 for(int i = 0; i < N; ++i){
   cin >> X[i] >>U[3][i];
   if(U[4][i] == "BTC") S += X[i]*380000.0;
   else S += X[i];
 }
  cout << S << endl;  
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |    if(U[4][i] == "BTC") S += X[i]*380000.0;
      |       ~~~~~~~~^~~~~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
  int N;
  float X[10];
  char U[3][10];
  char S =0.0;
 for(int i = 0; i < N; ++i){
   cin >> X[i] >>U[3][i];
   if(U[3][i] == "BTC") S += X[i]*380000;
   else S += X[i];
 }
  cout << S << endl;  
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |    if(U[3][i] == "BTC") S += X[i]*380000;
      |       ~~~~~~~~^~~~~~~~
Language: C++

#include<iostream>
using namespace std;

int main()
{
  int n;
  cin >> n;
  
  double s;
  s = 0;
  
  double x;
  char u;
  
  for(int i=0; i<n; i++){
    cin >> x >> u;
    if(u == "JPY")
      s += x;
    else if(u == "BTC")
      s += x*380000.0;
  }
  
  cout << s;
    
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |     if(u == "JPY")
      |        ~~^~~~~~~~
a.cc:19:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |     else if(u == "BTC")
      |             ~~^~~~~~~~
Language: C++

#include<iostream>
using namespace std;

int main()
{
  int n;
  cin >> n;
  
  double s;
  s = 0;
  
  double x;
  string u;
  
  for(int i=1; i<<N; i++){
    cin >> x >> u;
    if(u == "JPY")
      s += x;
    else if(u == "BTC")
      s += x*380000;
  }
  
  cout << s;
    
  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:15:19: error: 'N' was not declared in this scope
   15 |   for(int i=1; i<<N; i++){
      |                   ^
Language: C++

#include<iostream>
using namespace std;

int main()
{
  int N;
  cin >> N;
  
  double s;
  s = 0;
  
  double x;
  str u;
  
  for(int i=1; i<<N; i++){
    cin >> x >> u;
    if(u == "BTC")
      s = s + x*380000;
    else
      s = s + x;
  }
  
  cout << s;
    
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:3: error: 'str' was not declared in this scope; did you mean 'std'?
   13 |   str u;
      |   ^~~
      |   std
a.cc:16:17: error: 'u' was not declared in this scope
   16 |     cin >> x >> u;
      |                 ^
Language: C++

#include<iostream>
using namespace std;

int main()
{
  int N;
  cin >> N;
  
  double s;
  s = 0;
  
  double x;
  char u;
  
  for(int i=1; i<<N; i++){
    cin >> x >> u;
    if(u == "BTC")
      s = s + x*380000;
    else
      s = s + x;
  }
  
  cout << s;
    
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |     if(u == "BTC")
      |        ~~^~~~~~~~
Language: C++

#include<iostream>
using namespace std;

int main()
{
  int N;
  cin >> N;
  
  double s;
  
  double x;
  char u;
  
  for(int i=1; i<<N; i++){
    cin >> x >> u;
    if(u == "BTC")
      s = s + x*380000;
    else
      s = s + x;
  }
  
  cout << s;
    
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |     if(u == "BTC")
      |        ~~^~~~~~~~
Language: C++

#include<iostream>
using namespace std;

int main()
{
  int N;
  cin >> N;
  
  int s;
  
  int x;
  char u;
  
  for(int i=1; i<<N; i++){
    cin >> x >> u;
    if(u == "BTC")
      s = s + x*380000;
    else
      s = s + x;
  }
  
  cout << s;
    
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |     if(u == "BTC")
      |        ~~^~~~~~~~
Language: C++

#include<iostream>
using namespace std;

int main()
{
  int N;
  cin >> N;
  
  int s;
  
  int x;
  char u;
  
  for(int i=1; i<<N; i++){
    cin >> x >> u;
    if(u == "BTC")
      s = s + x*380000;
    else
      s = s + x;
  }
   
  print(s);
    
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |     if(u == "BTC")
      |        ~~^~~~~~~~
a.cc:22:3: error: 'print' was not declared in this scope; did you mean 'printf'?
   22 |   print(s);
      |   ^~~~~
      |   printf
Language: C++

#include<iostream>
using namespace std;

int main()
{
  int N;
  cin >> N;
  
  int s;
  
  int x;
  char u;
  
  for(int i=1; i<<N; i++){
    cin >> x >> u;
    if(u == BTC)
      s = s + x*380000;
    else
      s = s + x;
   
  print(s);
    
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: 'BTC' was not declared in this scope
   16 |     if(u == BTC)
      |             ^~~
a.cc:21:3: error: 'print' was not declared in this scope; did you mean 'printf'?
   21 |   print(s);
      |   ^~~~~
      |   printf
a.cc:24:2: error: expected '}' at end of input
   24 | }
      |  ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include<iostream>
using namespace std;

int main()
{
  int N;
  cin >> N;
  
  int s;
  
  int x;
  char u;
  
  for(int i=1; i<<N; i++){
    cin >> x >> u;
    if(u == "BTC")
      s = s + x*380000;
    else
      s = s + x;
   
  print(s);
    
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |     if(u == "BTC")
      |        ~~^~~~~~~~
a.cc:21:3: error: 'print' was not declared in this scope; did you mean 'printf'?
   21 |   print(s);
      |   ^~~~~
      |   printf
a.cc:24:2: error: expected '}' at end of input
   24 | }
      |  ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include<iostream>
using namespace std;

int main()
{
  int N;
  cin >> N;
  
  int s;
  
  int x;
  char u;
  
  for(int i=1; i<<N; i++){
    cin >> x >> u;
    if(u=="BTC")
      s += x*380000;
    else
      s += x;
   
  print(s);
    
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |     if(u=="BTC")
      |        ~^~~~~~~
a.cc:21:3: error: 'print' was not declared in this scope; did you mean 'printf'?
   21 |   print(s);
      |   ^~~~~
      |   printf
a.cc:24:2: error: expected '}' at end of input
   24 | }
      |  ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include<iostream>
using namespace std;

int main()
{
  int N;
  cin >> N;
  
  int s;
  
  int x;
  char u;
  
  for(int i=1; i<<N; i++){
    cin >> x >> u;
    if(u=="BTC")
      s += x*380000;
    else
      s += x;
   
  print(s)
    
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |     if(u=="BTC")
      |        ~^~~~~~~
a.cc:21:3: error: 'print' was not declared in this scope; did you mean 'printf'?
   21 |   print(s)
      |   ^~~~~
      |   printf
a.cc:24:2: error: expected '}' at end of input
   24 | }
      |  ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

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

int main(){
  int N ;
  double x[20] ;
  double u[20] ;
  cin >> N ;
  for(int i=0;i<N;i++){
    cin >> x[i] ;
    cin >> u[i] ;
  }
  double sum1=0 ;
  double sum2=0 ;
  for(int i=0;i<N;i++){
    if(u[i] == "JPY"){
      sum1 += x[i] ;
    }
    else if(u[i] =="BTC"){
      sum2 += x[i]*380000.0 ;
    }
  }
  cout << sum1+sum2 <<endl;
}
      

Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: invalid operands of types 'double' and 'const char [4]' to binary 'operator=='
   16 |     if(u[i] == "JPY"){
      |        ~~~~ ^~ ~~~~~
      |           |    |
      |           |    const char [4]
      |           double
a.cc:19:18: error: invalid operands of types 'double' and 'const char [4]' to binary 'operator=='
   19 |     else if(u[i] =="BTC"){
      |             ~~~~ ^~~~~~~
      |                |   |
      |                |   const char [4]
      |                double
Language: Java

import java.util.Scanner;

public class B119 {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		double ans = 0;
		double num = 0;
		String s;
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();

		for(int i = 0; i < N; i++) {
			num = sc.nextDouble();
			s = sc.next();

			if(s.equals("JPY")) {
				ans += num;
			} else {
				ans += num * 380000.0;
			}
		}

		System.out.println(ans);

		sc.close();
	}

}

Compiler output:
Main.java:3: error: class B119 is public, should be declared in a file named B119.java
public class B119 {
       ^
1 error
Language: Java

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		double ans = 0;
		double num = 0;
		String s;
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();

		for(int i = 0; i < N; i++) {
			num = sc.nextDouble();
			s = sc.next();

			if(s.equals("JPY")) {
				ans += num;
			} else {
				ans += num * 380000.0;
			}
		}

		System.out.println(ans);

		sc.close();
	}

}

Compiler output:
Main.java:9: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:9: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

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

int main () {
  int n;
  cin >> n;
  double x;
  string u;
  double ans=0;
  
  for(int i=0;i<n;i++){
    cin >> x >> u;
    if(u=="BTC"){
      ans+=380000*x;
    }​
    }
  }
  cout << ans << endl;
}
        

Compiler output:
a.cc: In function 'int main()':
a.cc:15:6: error: '\U0000200b' was not declared in this scope
   15 |     }​
      |       
a.cc: At global scope:
a.cc:18:3: error: 'cout' does not name a type
   18 |   cout << ans << endl;
      |   ^~~~
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
Language: C

int main(){
  int n,i;
  scanf("%d",s);
  double sum=0;
  for(i=0;i<n;i++)
  {
    char s[128];
    double k;
  	scanf("%lf %s",k,s);
    if(s=="JPY")
      sum+=k;
    else
      sum += (k*380000.0);
  }
  printf("%f",sum);
}

Compiler output:
main.c: In function 'main':
main.c:3:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 |   scanf("%d",s);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(){
main.c:3:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 |   scanf("%d",s);
      |   ^~~~~
main.c:3:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:3:14: error: 's' undeclared (first use in this function)
    3 |   scanf("%d",s);
      |              ^
main.c:3:14: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   15 |   printf("%f",sum);
      |   ^~~~~~
main.c:15:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:15:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:15:3: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include<stdio.h>
 
int main(){
  int n;
  scanf("%d",s);
  double sum=0;
  for(i=0;i<n;i++)
  {
    char s[128];
    double k;
  	scanf("%lf %s",k,s);
    if(s==JPY)
      sum+=k;
    else
      sum += (k*380000.0);
  }
  printf("%f",sum);
}

Compiler output:
main.c: In function 'main':
main.c:5:14: error: 's' undeclared (first use in this function)
    5 |   scanf("%d",s);
      |              ^
main.c:5:14: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:7: error: 'i' undeclared (first use in this function)
    7 |   for(i=0;i<n;i++)
      |       ^
main.c:12:11: error: 'JPY' undeclared (first use in this function)
   12 |     if(s==JPY)
      |           ^~~
Language: C

#include <bits/stdc++.h>
using namespace std;
long n;
double a[11];
string s[11];
double kq=0;
int main()
{
   cin>>n;
   for(long i=1;i<=n;i++)
   {
       cin>>a[i]>>s[i];
   }
   for(long i=1;i<=n;i++)
   {
       if(s[i]=="JPY") kq+=a[i];
       if(s[i]=="BTC") kq+=a[i]*380000;
   }
   cout<<kq;
}


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

#include <iostream>
#include <string>
using namespace std;
int main() {
  int n;
  cin >> n;
  double total = 0;
  for (int i = 0; i < n; i++) {
    double money;
    string type;
    cin >> money >> type;
    if (type == string("JPY"))
      total += monty;
    else
      total += 380000 * money;
  }
  cout << total;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:16: error: 'monty' was not declared in this scope; did you mean 'money'?
   13 |       total += monty;
      |                ^~~~~
      |                money
Language: C++

#include <iostream>
#include <vector>
#include <string>

#include "sandbox.h"

int main(int argc, char* argv[]) {
  using std::cin;
  using std::cout;
  using std::string;

  int n;
  cin >> n;

  double result = 0;

  for (int i = 0; i < n; i++) {
    double v;
    string currency;

    cin >> v;
    cin >> currency;

    if (currency == "BTC") {
      v *= 380000.0;
    }
    result += v;
  }

  cout << result;

  return 0;
}


Compiler output:
a.cc:5:10: fatal error: sandbox.h: No such file or directory
    5 | #include "sandbox.h"
      |          ^~~~~~~~~~~
compilation terminated.
Language: C++

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

int main()
{
  int N;
  cin >> N;
  sum = 0;
  for (int i = 0; i < N; ++i) {
    double x;
    string u;
    cin >> x >> u;
    if (u == "BTC") x *= 380000;
    sum += x;
  }
  cout << sum << endl;
  retur 0;
}

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

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

int main(){
  int N;
  cin >> N;
  
  double a;
  double sum=0.0;
  string c;
  for(int i=0;i<N;i++){
    cin >> a >> c;
    if(c=="BTC"){sum+=a*380000.0;}
    else{sum+=a;}
  }
  

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

#include<stdio.h>
int main(void)
{
  int n, i, ans=0;
  scanf("%d", &n);
  double a, b;
  char s;
  for(i=1;i<=n;i++){
    scanf("%lf %c", &a, &s);
    if(!strcmp(s, "BTC")){
      a *= 380000.0;
    }
    ans += a;
    a = 0
  }
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:10:9: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
   10 |     if(!strcmp(s, "BTC")){
      |         ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strcmp'
    1 | #include<stdio.h>
  +++ |+#include <string.h>
    2 | int main(void)
main.c:10:16: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   10 |     if(!strcmp(s, "BTC")){
      |                ^
      |                |
      |                char
main.c:10:16: note: expected 'const char *' but argument is of type 'char'
main.c:14:10: error: expected ';' before '}' token
   14 |     a = 0
      |          ^
      |          ;
   15 |   }
      |   ~
Language: C

#include<stdio.h>
int main(void)
{
  int n, i, ans=0;
  scanf("%d", &n);
  double a, b;
  char s;
  for(i=1;i<=n;i++){
    scanf("%lf %c", &a, &s);
    if(s=='BTC'){
      a *= 380000.0;
    }
    ans += a;
    a = 0
  }
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:10:11: warning: multi-character character constant [-Wmultichar]
   10 |     if(s=='BTC'){
      |           ^~~~~
main.c:14:10: error: expected ';' before '}' token
   14 |     a = 0
      |          ^
      |          ;
   15 |   }
      |   ~
Language: C

#include<stdio.h>
int main(void)
{
  int n, i, ans=0;
  scanf("%d", &n);
  double a, b;
  char s;
  for(i=1;i<=n;i++){
    scanf("%lf %c", %a, &s);
    if(s=='BTC'){
      a *= 380000.0;
    }
    ans += a;
    a = 0
  }
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:21: error: expected expression before '%' token
    9 |     scanf("%lf %c", %a, &s);
      |                     ^
main.c:10:11: warning: multi-character character constant [-Wmultichar]
   10 |     if(s=='BTC'){
      |           ^~~~~
main.c:14:10: error: expected ';' before '}' token
   14 |     a = 0
      |          ^
      |          ;
   15 |   }
      |   ~
Language: C++

int main() {
	int n;
	cin >> n;
	double ans = 0;
	for (int i = 0; i < n; i++) {
		double num;
		string syu;
		cin >> num >> syu;
		if (syu == "BTS")num *= 380000;
		ans += num;
	}
	cout << ans;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'cin' was not declared in this scope
    3 |         cin >> n;
      |         ^~~
a.cc:7:17: error: 'string' was not declared in this scope
    7 |                 string syu;
      |                 ^~~~~~
a.cc:8:31: error: 'syu' was not declared in this scope
    8 |                 cin >> num >> syu;
      |                               ^~~
a.cc:12:9: error: 'cout' was not declared in this scope
   12 |         cout << ans;
      |         ^~~~
Language: C

#include<stdio.h>

int
main()
{
 	int N,i,goukei;
    goukei =1;
  	scanf("%d",N);
  	do{
      double x;
      char u[4];
      int 
      scanf("%d",x);
      scanf("%s",u);
      switch(u){
        case "JPY":
          goukei += x;
          break;
        case "BTC":
          goukei += x*380000.0;
          break;
       }
      i++;
    }while(i<=N);
  printf("%d\n",goukei);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:13: error: expected declaration specifiers or '...' before string constant
   13 |       scanf("%d",x);
      |             ^~~~
main.c:13:18: error: expected declaration specifiers or '...' before 'x'
   13 |       scanf("%d",x);
      |                  ^
main.c:15:14: error: switch quantity not an integer
   15 |       switch(u){
      |              ^
main.c:16:9: error: pointers are not permitted as case values
   16 |         case "JPY":
      |         ^~~~
main.c:19:9: error: pointers are not permitted as case values
   19 |         case "BTC":
      |         ^~~~
Language: C++

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

int main(){
  int N;
  int sum =0;
  double a;
  string b;
  double c = 380000.0;
  for(int i=0;i<N;++i){
    cin >> a >> b;
    if(b.at(0)=='B'){
      sum += a*c;
    }
    else{
      sum += a;
  }
  cout << sum <<endl;
}

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