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

#include<iostream>
using namespace std;
int main(){
  int N;
  cin>>N;
  int M=N/2;
  M=N-M;
  double p=M/N;
  cout<<p<<endl;
  return 0
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: expected ';' before '}' token
   10 |   return 0
      |           ^
      |           ;
   11 | }
      | ~
Language: C++

#include<iostream>
using namespace std;
int main(){
  int N;
  cin>>N;
  int M=N/2;
  M=N-M;
  double p=M/N;
  cout<<p<<endl;
  retuen 0
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'retuen' was not declared in this scope
   10 |   retuen 0
      |   ^~~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
	int n,cnt =0; cin>>n;
  for(int i=1 ; i <= n ; i++){
  	if(n%2==1) cnt++;
  }
  cout<<fixed<<setprecision(6)<< cnt/n;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: 'setprecision' was not declared in this scope
    8 |   cout<<fixed<<setprecision(6)<< cnt/n;
      |                ^~~~~~~~~~~~
a.cc:2:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
    1 | #include<iostream>
  +++ |+#include <iomanip>
    2 | using namespace std;
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
	double n;
  cin>>n;
  cout<<setprecision(10)<<((n%2==0)?n/(2*n):(n/2+(double)1)/n);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:30: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    7 |   cout<<setprecision(10)<<((n%2==0)?n/(2*n):(n/2+(double)1)/n);
      |                             ~^~
      |                             | |
      |                             | int
      |                             double
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
	double n;
  cin>>n;
  cout<<setprecision(10)<<(n%2==0)?n/(2*n):(n/2+1)/n;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:29: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    7 |   cout<<setprecision(10)<<(n%2==0)?n/(2*n):(n/2+1)/n;
      |                            ~^~
      |                            | |
      |                            | int
      |                            double
Language: C

#include<stdio.h>

int main(){
  int n;
  scanf("%d", &n);
  
  int n_odds = (n+1)/2;
  float prob = n_odd/n;
  
  print("%f", prob);
}

Compiler output:
main.c: In function 'main':
main.c:8:16: error: 'n_odd' undeclared (first use in this function); did you mean 'n_odds'?
    8 |   float prob = n_odd/n;
      |                ^~~~~
      |                n_odds
main.c:8:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:3: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   10 |   print("%f", prob);
      |   ^~~~~
      |   printf
Language: C++

#include <iostream>
using namespace std;

int main(){
	int n;
  cin>>n;
  cout<<fixed<<setprecision(10)<<(double)(n-n/2)/n;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: 'setprecision' was not declared in this scope
    7 |   cout<<fixed<<setprecision(10)<<(double)(n-n/2)/n;
      |                ^~~~~~~~~~~~
a.cc:2:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
    1 | #include <iostream>
  +++ |+#include <iomanip>
    2 | using namespace std;
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    final int N=sc.nextInt();
    int[] array1=new int[N];
    int counter=0;
    for(int i=0;i<N;i++){
    	array[i]=i+1;
    }
    for(int i=0;i<N;i++){
    	if(array[i]%2==1){
        	counter++;
        }
    }
    double answer=counter/N;
    System.out.println(answer);
  }
}

Compiler output:
Main.java:10: error: cannot find symbol
    	array[i]=i+1;
    	^
  symbol:   variable array
  location: class Main
Main.java:13: error: cannot find symbol
    	if(array[i]%2==1){
    	   ^
  symbol:   variable array
  location: class Main
2 errors
Language: Java

import java.util.*

public class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    final int N=sc.nextInt();
    int[] array1=new int[N];
    int counter=0;
    for(int i=0;i<N;i++){
    	array[i]=i+1;
    }
    for(int i=0;i<N;i++){
    	if(array[i]%2==1){
        	counter++;
        }
    }
    double answer=counter/N;
    System.out.println(answer);
  }
}

Compiler output:
Main.java:1: error: ';' expected
import java.util.*
                  ^
1 error
Language: C++

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

int main() {
  int N;
  double a;
  cin >> N;
  if(N % 2 == 0){
    a == N/(2*N);
  }
  else{
  	a == (N + 1)/(2*N);
  }
  cout << a << endl;


Compiler output:
a.cc: In function 'int main()':
a.cc:14:21: error: expected '}' at end of input
   14 |   cout << a << endl;
      |                     ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main() {
  double N;
  cin >> N;
  if(N % 2 == 0){
    cout << N/(2*N)<< endl;
  }
  else{
  	cout << (N + 1)/(2*N) << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    7 |   if(N % 2 == 0){
      |      ~ ^ ~
      |      |   |
      |      |   int
      |      double
Language: C++

#include <bits/stdc++.h>
using namespace std;
double n,b;
int i;
int main() {
  cin >> n ;
  for(i=1;i<=n;i++)
    if (i%2!=0)
      a++;
  cout<<fixed;
  cout<<setprecision(9)<<a/n;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: 'a' was not declared in this scope
    9 |       a++;
      |       ^
a.cc:11:26: error: 'a' was not declared in this scope
   11 |   cout<<setprecision(9)<<a/n;
      |                          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)

int main()
{
    double N;
    cin >> N;
    if (N == 1)
    {
        cout << 1 << endl;
    }
    else if (N % 2 == 0)
    {
        cout << 0.5 << endl;
    }
    else
    {
        cout << (double)(((N + 1) / 2) / N) << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:16: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   14 |     else if (N % 2 == 0)
      |              ~ ^ ~
      |              |   |
      |              |   int
      |              double
Language: C++

#include<bits/stdc++.h>

#define ll long long int
#define pb push_back
#define eb emplace_back
#define xx first
#define yy second
#define INF 0x3f3f3f3f
#define show(x) cerr<<#x<<" : "<<x<<'\n';
#define yogeshk972() cerr<<"\nTime Taken : "<<(float)(clock()-time_p)/CLOCKS_PER_SEC<<"\n";
clock_t time_p=clock();

using namespace std;
const int N=1e6, mod= 1e9+7;
ll p[N],w[N],v[N],vec[ (1<<21)+1 ];

int main(){
	ios_base::sync_with_stdio(0);	cin.tie(0);
	int n;
	cin>>n;
	if( (n&1)==0)cout<<"0.5";
	else cout<<set_precision(10)<<(double)(n-n/2)/n;
	
    yogeshk972();
}



Compiler output:
a.cc: In function 'int main()':
a.cc:22:20: error: 'set_precision' was not declared in this scope
   22 |         else cout<<set_precision(10)<<(double)(n-n/2)/n;
      |                    ^~~~~~~~~~~~~
Language: C++

#[allow(unused_macros)]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r| r.unwrap() as char)
                .skip_while(|c| c.is_whitespace())
                .take_while(|c| !c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};
    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    }
}

#[allow(unused_macros)]
macro_rules! read_value {
    ($next:expr, ( $($t:tt), * )) => {
        ( $(read_value!($next, $t)),* )
    };
    ($next:expr, [ $t:tt; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };
    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };
    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };
    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}



fn main() {
    input!(n: usize,);
    let prob = ((n + 1) / 2) as f64 / n as f64;
    println!("{}", prob);
}


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #[
    1 | #[allow(unused_macros)]
      |  ^
a.cc:23:2: error: invalid preprocessing directive #[
   23 | #[allow(unused_macros)]
      |  ^
a.cc:33:2: error: invalid preprocessing directive #[
   33 | #[allow(unused_macros)]
      |  ^
a.cc:39:10: error: too many decimal points in number
   39 |         (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
      |          ^~~~~~~
a.cc:2:1: error: 'macro_rules' does not name a type
    2 | macro_rules! input {
      | ^~~~~~~~~~~
a.cc:24:1: error: 'macro_rules' does not name a type
   24 | macro_rules! input_inner {
      | ^~~~~~~~~~~
a.cc:34:1: error: 'macro_rules' does not name a type
   34 | macro_rules! read_value {
      | ^~~~~~~~~~~
a.cc:54:1: error: 'fn' does not name a type
   54 | fn main() {
      | ^~
Language: C++

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

int main(){
  double n; cin>>n;
  if(n%2==0){
    cout<<double(0.5)<<endl;
  }else{
    cout<<(n/2+1)/n<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    6 |   if(n%2==0){
      |      ~^~
      |      | |
      |      | int
      |      double
Language: C

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


int isprime(int x){
    for(int i = 2; i <= sqrt(x); i++){
        if (x % i == 0)
            return 0;
    }
    return 1;
}
int main(){
    float a,b,t = 0;

    scanf("%f%f", &a, &b);

    for(int i = 1; i <= a && i <= b; i ++){
        if(a % i == 0 && b % i == 0){
            a = a/i;
            b = b/i;
            if(isprime(i)){
                t++;
            }
        }
    }
    printf("%f",t);

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:14: error: invalid operands to binary % (have 'float' and 'int')
   18 |         if(a % i == 0 && b % i == 0){
      |              ^
main.c:18:28: error: invalid operands to binary % (have 'float' and 'int')
   18 |         if(a % i == 0 && b % i == 0){
      |                            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(false); cin.tie(0);
#define FOR(i,s,n) for(int i = s; i < (n); i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(n) (n).begin(), (n).end()
#define RALL(n) (n).rbegin(), (n).rend()
#define ATYN(n) cout << ( (n) ? "Yes":"No") << endl;
#define CFYN(n) cout << ( (n) ? "YES":"NO") << endl;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int,int>;

int main(void)
{
    IOS
    int n; cin >> n;
    int cnt = 0;
    FOR(i,1,n+1) if(i % 2 == 1) cnt++;
    double ans = (double) cnt / n;
    cout << fixed << setprecision(10) <<  << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:43: error: expected primary-expression before '<<' token
   21 |     cout << fixed << setprecision(10) <<  << endl;
      |                                           ^~
Language: C++

    #include<bits/stdc++.h>
    using namespace std;
    typedef long long ll;
     
    ll gcd(ll a,ll b)
    {
        if(b==0)
            return a;
        return gcd(b,a%b);
    }
    int prime(int n)
    {
        for(int i=2; i*i<=n; i++)
        {
            if(n%i==0)
                return -1;
        }
        return 1;
    }
    void primefactors(int n)  
    {   
      	int cnt=0;
        for (int i=6; i<=sqrt(n); i = i+6)  
        {  
            if(n%(i-1)==0)  
            {  
              	if(prime(i-1)==1)
                	cnt++;
              	if(n/(i-1)!=(i-1) && prime(n/(i-1))==1)
                  	cnt++;
            }
            if(n%(i+1)==0)  
            {  
              	if(prime(i+1)==1)
                	cnt++; 
              	if(n/(i+1)!=(i+1) && prime(n/(i+1))==1)
                  	cnt++;
            }
        }
      	if(n>=3)
          	cnt+=3;
      	else if(n>=2)
          	cnt+=2;
      	else
          	cnt+=1;
    }  
        int main()
        {
        	ll a,b;
        	ll divisor;
        	cin >> a >> b;
        	if(a>b)
        		divisor=gcd(a,b);
        	else
        		divisor=gcd(b,a);
        	
        	int cnt=0;
            primefactor(divisor);
         	return 0;
        }

Compiler output:
a.cc: In function 'int main()':
a.cc:58:13: error: 'primefactor' was not declared in this scope; did you mean 'primefactors'?
   58 |             primefactor(divisor);
      |             ^~~~~~~~~~~
      |             primefactors
Language: C++

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

ll gcd(ll a,ll b)
{
    if(b==0)
        return a;
    return gcd(b,a%b);
}
int prime(int n)
{
    for(int i=2; i*i<=n; i++)
    {
        if(n%i==0)
            return -1;
    }
    return 1;
}
void primefactors(int n)  
{   
  	int cnt=0;
    for (int i=6; i<=sqrt(n); i = i+6)  
    {  
        if(n%(i-1)==0)  
        {  
          	if(prime(i-1)==1)
            	cnt++;
          	if(n/(i-1)!=(i-1) && prime(n/(i-1))==1)
              	cnt++;
        }
        if(n%(i+1)==0)  
        {  
          	if(prime(i+1)==1)
            	cnt++; 
          	if(n/(i+1)!=(i+1) && prime(n/(i+1))==1)
              	cnt++;
        }
    }
  	if(n>=3)
      	cnt+=3;
  	else if(n>=2)
      	cnt+=2;
  	else
      	cnt+=1;
}  
    int main()
    {
    	ll a,b;
    	ll divisor;
    	cin >> a >> b;
    	if(a>b)
    		divisor=gcd(a,b);
    	else
    		divisor=gcd(b,a);
    	
    	int cnt=0;
        primefactor(divisor);
     	return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:58:9: error: 'primefactor' was not declared in this scope; did you mean 'primefactors'?
   58 |         primefactor(divisor);
      |         ^~~~~~~~~~~
      |         primefactors
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0 ; i< (n) ; i++)
using ll = long long;


int main()
{	
	int n; cin >> n;
	int count = 0;
	for(int i = 1; i<=n ;i++){
		if(i&1) count++;
	}
	double ans = count / n;
	cout << double << endl;
   
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: expected primary-expression before 'double'
   15 |         cout << double << endl;
      |                 ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0 ; i< (n) ; i++)
using ll = long long


int main()
{	
	int n; cin >> n;
	int count = 0;
	for(int i = 1; i<=n ;i++){
		if(i&1) count++;
	}
	double ans = count / n;
	cout << double << endl;
   
    return 0;
}


Compiler output:
a.cc:7:4: error: expected ';' before 'main'
    7 | int main()
      |    ^~~~~
      |    ;
Language: C++

int main(){
  int count = 0;
  double ans = 0;
 	for(int i = 0; i < N;i++){
      bool flag = 0;
      flag = i % 2;
      if(flag == 1) count++;
    }
  ans = count / N;	
  	return ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:28: error: 'N' was not declared in this scope
    4 |         for(int i = 0; i < N;i++){
      |                            ^
a.cc:9:17: error: 'N' was not declared in this scope
    9 |   ans = count / N;
      |                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(false); cin.tie(0);
#define FOR(i,s,n) for(int i = s; i < (n); i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(n) (n).begin(), (n).end()
#define RALL(n) (n).rbegin(), (n).rend()
#define ATYN(n) cout << ( (n) ? "Yes":"No") << endl;
#define CFYN(n) cout << ( (n) ? "YES":"NO") << endl;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int,int>;

ll gcd(ll a,ll b){
    if (a % b == 0) {
        return b;
    } else {
        return gcd(b,a%b);
    }
}

ll lcm(ll x, ll y) {
    return x*y / gcd(x,y);
}

int main(void)
{
    IOS
    ll a,b; cin >> a >> b;
    ll g = gcd(a,b);
    int ans = 1;
    for (auto i = 2,auto g2 = g; i*i <= g && c != 1; i++) {
        if (g2 % i == 0) {
            ans++;
            while(g2 % i == 0) g2 /= i;
        }
    }

    cout << ans << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:21: error: expected unqualified-id before 'auto'
   32 |     for (auto i = 2,auto g2 = g; i*i <= g && c != 1; i++) {
      |                     ^~~~
a.cc:32:21: error: expected ';' before 'auto'
   32 |     for (auto i = 2,auto g2 = g; i*i <= g && c != 1; i++) {
      |                     ^~~~
      |                     ;
a.cc:32:46: error: 'c' was not declared in this scope
   32 |     for (auto i = 2,auto g2 = g; i*i <= g && c != 1; i++) {
      |                                              ^
a.cc:32:52: error: expected ')' before ';' token
   32 |     for (auto i = 2,auto g2 = g; i*i <= g && c != 1; i++) {
      |         ~                                          ^
      |                                                    )
a.cc:32:54: error: 'i' was not declared in this scope
   32 |     for (auto i = 2,auto g2 = g; i*i <= g && c != 1; i++) {
      |                                                      ^
Language: C

#include <stdio.h>
int main (void){
  int N;
  double p, M;
  scanf("%d", &N);
  if(N%2=0){
    M=N/2;
    p=1/M;
    printf("%f", p);
  }else{
    M=(N+1)/2;
    p=1/M;
    printf("%f", p);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:9: error: lvalue required as left operand of assignment
    6 |   if(N%2=0){
      |         ^
Language: C++

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

int main() {
    int n;
    cin>>n;
if(n == 1){
    cout<<1.0000000000<<endl;
}elsif(n%2 == 0){
        cout<<0.5000000000<<endl;
    }else{
        cout<<0.6000000000<<endl;
    }
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:2: error: 'elsif' was not declared in this scope
    9 | }elsif(n%2 == 0){
      |  ^~~~~
a.cc:11:6: error: 'else' without a previous 'if'
   11 |     }else{
      |      ^~~~
Language: C

#include<iostream>

using namespace std;

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

    double l = n /2;

    if(n % 2 == 0){
        cout << l / n << "\n";
    }
    else{
        cout << (l + 1) / n << "\n";
    }
}

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

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

int main(){
  int N; cin >> N;
  int A = (N+1)/2;
  cout << (double A)/N << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: expected primary-expression before 'double'
    7 |   cout << (double A)/N << endl;
      |            ^~~~~~
a.cc:7:12: error: expected ')' before 'double'
    7 |   cout << (double A)/N << endl;
      |           ~^~~~~~
      |            )
Language: Java

import java.util.*;

public class ss {
    public static void main(String[] args){
        Scanner scan=new Scanner(System.in);
        int n=0;
        if(scan.hasNext())
            n=scan.nextInt();
        double d;
        if(n%2==0){
            d=0.5;
            System.out.format("%.10f",d);
        }else{
            d=n/2 + 1;
            d=d/n;
            System.out.format("%.10f",d);
        }
    }
}


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

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

int main() {
  int N;
  cin >> N;
  if(N%2==0) cout << "0.5" << endl;
  else cout << double (N+1)/2/N << endl;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #nclude; did you mean #include?
    1 | #nclude <bits/stdc++.h>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> N;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #nclude <bits/stdc++.h>
a.cc:7:14: error: 'cout' was not declared in this scope
    7 |   if(N%2==0) cout << "0.5" << endl;
      |              ^~~~
a.cc:7:14: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:7:31: error: 'endl' was not declared in this scope
    7 |   if(N%2==0) cout << "0.5" << endl;
      |                               ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #nclude <bits/stdc++.h>
a.cc:8:8: error: 'cout' was not declared in this scope
    8 |   else cout << double (N+1)/2/N << endl;
      |        ^~~~
a.cc:8:8: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:36: error: 'endl' was not declared in this scope
    8 |   else cout << double (N+1)/2/N << endl;
      |                                    ^~~~
a.cc:8:36: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: Java

import java.util.Scanner;
public class od{
    public static void main(String[] args){
        int N = 101;
        int sum = 0;
        double p;
        Scanner scanner = new Scanner();
        while (N >= 100) {
            N = scanner.next();
        }
        for (int i = 1; i <= N; i++) {
            if (i % 2 == 1) {
                sum += 1;
            }
        }
        p = sum / N;
        System.out.print(p);
    }
}

Compiler output:
Main.java:2: error: class od is public, should be declared in a file named od.java
public class od{
       ^
Main.java:7: error: no suitable constructor found for Scanner(no arguments)
        Scanner scanner = new Scanner();
                          ^
    constructor Scanner.Scanner(Readable,Pattern) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Readable) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(InputStream) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(InputStream,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(InputStream,Charset) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File,Charset) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File,CharsetDecoder) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Path) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Path,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Path,Charset) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(ReadableByteChannel) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(ReadableByteChannel,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(ReadableByteChannel,Charset) is not applicable
      (actual and formal argument lists differ in length)
Main.java:9: error: incompatible types: String cannot be converted to int
            N = scanner.next();
                            ^
3 errors
Language: C++

1>------ ビルド開始: プロジェクト: 競プロ②, 構成: Debug Win32 ------
1>Source.cpp
1>競プロ②.vcxproj -> C:\Users\ttt27\source\repos\競プロ②\Debug\競プロ②.exe
========== ビルド: 1 正常終了、0 失敗、0 更新不要、0 スキップ ==========


Compiler output:
a.cc:3:24: error: stray '\' in program
    3 | 1>競プロ②.vcxproj -> C:\Users\ttt27\source\repos\競プロ②\Debug\競プロ②.exe
      |                        ^
a.cc:3:30: error: stray '\' in program
    3 | 1>競プロ②.vcxproj -> C:\Users\ttt27\source\repos\競プロ②\Debug\競プロ②.exe
      |                              ^
a.cc:3:36: error: stray '\' in program
    3 | 1>競プロ②.vcxproj -> C:\Users\ttt27\source\repos\競プロ②\Debug\競プロ②.exe
      |                                    ^
a.cc:3:43: error: stray '\' in program
    3 | 1>競プロ②.vcxproj -> C:\Users\ttt27\source\repos\競プロ②\Debug\競プロ②.exe
      |                                           ^
a.cc:3:49: error: stray '\' in program
    3 | 1>競プロ②.vcxproj -> C:\Users\ttt27\source\repos\競プロ②\Debug\競プロ②.exe
      |                                                 ^
a.cc:3:57: error: stray '\' in program
    3 | 1>競プロ②.vcxproj -> C:\Users\ttt27\source\repos\競プロ②\Debug\競プロ②.exe
      |                                                         ^
a.cc:3:63: error: stray '\' in program
    3 | 1>競プロ②.vcxproj -> C:\Users\ttt27\source\repos\競プロ②\Debug\競プロ②.exe
      |                                                               ^
a.cc:4:22: error: extended character 、 is not valid in an identifier
    4 | ========== ビルド: 1 正常終了、0 失敗、0 更新不要、0 スキップ ==========
      |                      ^
a.cc:4:34: error: extended character 、 is not valid in an identifier
    4 | ========== ビルド: 1 正常終了、0 失敗、0 更新不要、0 スキップ ==========
      |                                  ^
a.cc:4:42: error: extended character 、 is not valid in an identifier
    4 | ========== ビルド: 1 正常終了、0 失敗、0 更新不要、0 スキップ ==========
      |                                          ^
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 1>------ ビルド開始: プロジェクト: 競プロ②, 構成: Debug Win32 ------
      | ^
Language: C++

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

int main(){
    int N;
    cin >> N;
    int odd = (N+1)/2;
    double ans = (double)odd/n;
    printf("%.10f\n",ans);

}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:30: error: 'n' was not declared in this scope
   10 |     double ans = (double)odd/n;
      |                              ^
Language: C++

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

int main(){
    int N;
    cin >> N;
    int odd = (n+1)/2;
    double ans = (double)odd/n;
    printf("%.10f\n",ans);

}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: 'n' was not declared in this scope
    9 |     int odd = (n+1)/2;
      |                ^
Language: Java

import java.util.Scanner;

public class Main { 

    public static void main(String[] args) throws IOException {
      Scanner sc = new Scanner(System.in);
        long a = sc.nextLong();
        long b = sc.nextLong();
        long gcd = gcd(a, b);
        int res = 1;
        if(gcd%2 == 0)
        {
            res++;
            while(gcd%2 == 0)
            {
                gcd/=2;
            }
        }
        for (int i = 3; i*i <=gcd ; i+=2) {
            if(gcd % i == 0)
            {
                res++;
                while(gcd%i == 0)
                    gcd/=i;
            }
        }
        if(gcd > 2)
            res++;
        System.out.println(res);
    }

    static long gcd(long a, long b) {
        if (b == 0)
            return a;
        return gcd(b, a % b);

    }


}


Compiler output:
Main.java:5: error: cannot find symbol
    public static void main(String[] args) throws IOException {
                                                  ^
  symbol:   class IOException
  location: class Main
1 error
Language: C++

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

int main() {
  int64_t A,B,C=1,ans=1;
  cin >> A >> B;
  while(B!=0){
    A%=B;
    swap(A,B);
  }
  C = A
  if (C > 1) {
    for (int i=1; i<C; i++) {
        if (C%(i+1) == 0) {
        ans++;
        while(C%(i+1)==0) {
        C /= i+1;
        }
      }
      if (C==1) {
        break;
      }
    }
  } 
  cout << ans << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:11:8: error: expected ';' before 'if'
   11 |   C = A
      |        ^
      |        ;
   12 |   if (C > 1) {
      |   ~~
Language: C++

#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <vector>
#include <stdio.h>
#include <algorithm>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <queue>
#include <set>
#include <map>

#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define for_p(i, a, b) for(int i = a; i < b; i++)
#define for_m(i, a, b) for(int i = a - 1; i >= b; i--)

//a = s1.size();
//vector<string> s1;
//string s2 = accumulate( s1.begin(), s1.end(), string() );

using namespace std;

int main()
{
  int a = 0 , b = 0, c = 0, d = 0, e = 0, f = 0;
  int i = 0, j = 0;
  double d1 = 0, d2 = 0, d3 = 0, d4 = 0, d5 = 0, d6 = 0;
  int a1[256], a2[512], a3[1024];
  char s1[200000], s2[200000], s3[200000];
  
  cin >> a;
  　
  if(a % 2 == 0){
    d1 = 0.5;
  }else{
    d2 = ((a - 1) / 2);
    d1 = 1 - d2 / double(a);
  }
  cout << d1 << endl;
}


Compiler output:
a.cc:34:3: error: extended character 　 is not valid in an identifier
   34 |   　
      |   ^
a.cc: In function 'int main()':
a.cc:34:3: error: '\U00003000' was not declared in this scope
   34 |   　
      |   ^~
a.cc:37:4: error: 'else' without a previous 'if'
   37 |   }else{
      |    ^~~~
Language: C

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>



int main()
{
	int A, B;
	scanf("%d %d", &A, &B);

	

	int x, min, Ans = 0;
	if (A >= B) min = B;
	else min = A;

	for (x = min; x > 0; x--) {

		int  t, m = 0;

		if (x >= 4) {
			for (t = 2; t < x; t++) {
				if (x % t == 0) {
					m++;
					break;
				}
				
			}
		}

		if (A % x == 0 && B % x == 0 && m=0) Ans++;
	}


	printf("%d", Ans);
	
}






Compiler output:
main.c: In function 'main':
main.c:34:50: error: lvalue required as left operand of assignment
   34 |                 if (A % x == 0 && B % x == 0 && m=0) Ans++;
      |                                                  ^
Language: C++

#include <bits/stdc++.h> 
using namespace std;
#define int long long
#define mod 1000000007
 
signed main() {
 
 
  //  ios::sync_with_stdio(0); cin.tie(0);
    //cout.tie(0);
 
 
   // freopen("input.txt","r",stdin);
    // freopen("output_M.txt","w",stdout);
        
    int t;
    cin>>t;
    if(t==1) cout<<1.0<<endl;
    if(t%2==0)
    {
        int even = n/2;
         int prob = (n -even)/n;
         cout<<prob<<endl;
    }
    else cout<<0.50<<endl;
  	return 0;
 
 
}

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

#include <iostream>
#include <cstdio>

using namespace std;

int main()
{
  long double n;
  cin >> n;
  
  if (n % 2) {
    printf("%.10lf\n", (n/2+1)/n);
  }
  else {
    printf("%.10lf\n", (n/2)/n);
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: invalid operands of types 'long double' and 'int' to binary 'operator%'
   11 |   if (n % 2) {
      |       ~ ^ ~
      |       |   |
      |       |   int
      |       long double
Language: C++

clude <bits/stdc++.h> 
 
using namespace std;
 
#define int long long
#define mod 1000000007
 
 
signed main() {
 
 
    ios::sync_with_stdio(0); cin.tie(0);
    cout.tie(0);
   // freopen("input.txt","r",stdin);
    //freopen("output_M.txt","w",stdout);
        
    int t;
    cin>>t;
    if(t==1) cout<<1.0<<endl;
    if(t%2==0)
    {
        int even = n/2;
         int prob = (n -even)/n;
         cout<<prob<<endl;
    }
    else cout<<0.50<<endl;
  	return 0;
 
 
}

Compiler output:
a.cc:1:1: error: 'clude' does not name a type
    1 | clude <bits/stdc++.h>
      | ^~~~~
a.cc: In function 'int main()':
a.cc:12:5: error: 'ios' has not been declared
   12 |     ios::sync_with_stdio(0); cin.tie(0);
      |     ^~~
a.cc:12:30: error: 'cin' was not declared in this scope
   12 |     ios::sync_with_stdio(0); cin.tie(0);
      |                              ^~~
a.cc:13:5: error: 'cout' was not declared in this scope
   13 |     cout.tie(0);
      |     ^~~~
a.cc:19:25: error: 'endl' was not declared in this scope
   19 |     if(t==1) cout<<1.0<<endl;
      |                         ^~~~
a.cc:22:20: error: 'n' was not declared in this scope
   22 |         int even = n/2;
      |                    ^
a.cc:24:22: error: 'endl' was not declared in this scope
   24 |          cout<<prob<<endl;
      |                      ^~~~
a.cc:26:22: error: 'endl' was not declared in this scope
   26 |     else cout<<0.50<<endl;
      |                      ^~~~
Language: C++

#include <bits/stdc++.h> 

using namespace std;

#define int long long
#define mod 1000000007


signed main() {
 

    ios::sync_with_stdio(0); cin.tie(0);
    cout.tie(0);


    freopen("input.txt","r",stdin);
    freopen("output_M.txt","w",stdout);
        
    int t;
    cin>>t;
    if(t==1) cout<<1.0<<endl;
    if(t%2==0)
    {
        int even = n/2;
         int prob = (n -even)/n;
         cout<<prob<<endl;
    }
    else cout<<0.50<<endl;
  	return 0;


}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:20: error: 'n' was not declared in this scope
   24 |         int even = n/2;
      |                    ^
Language: C++

#include <iostream>
using namespace std;
int main(){
  int a,b,c,ans=1;
  cin>>a>>b;
  if(a<=b){
    c=a;
  }
  else if(a>b){
    c=b;
  }
  int num[c],count=0;
  for (int i=1;i<=c;i++){
    if(a%i==0&&b%i==0){
      num[count]=i;
      count++;
    }
  }
  int nu=num[count],mem[nu];
  for (int i=1;i<=nu;i++){
    flag=0;
    for(int j=2;j<i;j++){
      if(i%j==0){
        flag=1;
        break;
      }
    }
    if(flag==0){
      mem[i]=i;
    }
  }
  for (int i=1;i<=nu;i++){
    if(nu%mem[i]==0){
      ans++;
    }
  }
  cout<<ans<<endl;
  return 0;
}


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

#include <bits/stdc++.h>
using namespace std;
int main(){
  int n=1;
  cin >> n;
  if(n!=1){
    a=n/2;
  }
  double ans=a/n;
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'a' was not declared in this scope
    7 |     a=n/2;
      |     ^
a.cc:9:14: error: 'a' was not declared in this scope
    9 |   double ans=a/n;
      |              ^
Language: C

#include<stdio.h>

int main(void){
int N x;
scanf("%d",N);
N/2=x;

printf("%d0.9f",x);

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:7: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'x'
    4 | int N x;
      |       ^
main.c:4:7: error: 'x' undeclared (first use in this function)
main.c:4:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:12: error: 'N' undeclared (first use in this function)
    5 | scanf("%d",N);
      |            ^
Language: C++

#include <iostream>
using namespace std;
int main(){
  int a,b,c,ans=1;
  cin>>a>>b;
  if(a<=b){
    c=a;
  }
  else if(a>b){
    c=b;
  }
  int num[c],count=0;
  for (int i=1;i<=c;i++){
    if(a%i==0&&b%i==0){
      num[count]=i;
      count++;
    }
  }
  int nu=num[count];
  for (int i=1;i<=nu;i++){
    flag=0;
    for(int j=2;j<i;j++){
      if(i%j==0){
        flag=1;
        break;
      }
    }
    if(flag==0){
      ans++;
    }
  }
  cout<<ans<<endl;
  return 0;
}


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

#include <bits/stdc++.h>
using namespace std;
 
double main() {
  double N ;
  cin >> N;
 
  if (N%2==1) {
    cout << (N+1)*0.5/N << endl;
  }
  else {
  cout << 1.0/2.0<< endl;
  }
}

Compiler output:
a.cc:4:1: error: '::main' must return 'int'
    4 | double main() {
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:8:8: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    8 |   if (N%2==1) {
      |       ~^~
      |       | |
      |       | int
      |       double
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
double main() {
  double N ;
  cin >> N;
 
  if (N%2.0==1.0) {
    cout << (N+1.0)*0.5/N << endl;
  }
  else {
  cout << 1/2<< endl;
  }
}

Compiler output:
a.cc:4:1: error: '::main' must return 'int'
    4 | double main() {
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:8:8: error: invalid operands of types 'double' and 'double' to binary 'operator%'
    8 |   if (N%2.0==1.0) {
      |       ~^~~~
      |       | |
      |       | double
      |       double
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
   ll a,b,c,cnt=0;
   cin >> a >> b;
   c = __gcd(a,b);
   ll d[sqrt(c)+1];
   for(ll i=0;i<sqrt(c)+1;i++){
        d[i]=0;
   }
   for(ll k=2;k<=sqrt(c)+1;k++){
       for(ll i=1;i<=sqrt(c)+1;i++){
           if(i%k==0) d[i-1]++;
       }
   }
   ll e = c;
   set<ll> f;
   for(ll i=0;i<c;i++){
       if(d[i]==1){
           while(e%(i+1)==0){ 
               e/= (i+1);
               f.insert(i+1);
           }
       }
   }
   
   cout << f.size()+1 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: conversion from '__gnu_cxx::__enable_if<true, double>::__type' {aka 'double'} to 'long unsigned int' in a converted constant expression
    8 |    ll d[sqrt(c)+1];
      |         ~~~~~~~^~
a.cc:8:16: error: could not convert '(std::sqrt<long long int>(c) + (__gnu_cxx::__enable_if<true, double>::__type)1)' from '__gnu_cxx::__enable_if<true, double>::__type' {aka 'double'} to 'long unsigned int'
    8 |    ll d[sqrt(c)+1];
      |         ~~~~~~~^~
      |                |
      |                __gnu_cxx::__enable_if<true, double>::__type {aka double}
a.cc:8:16: error: size of array 'd' has non-integral type '__gnu_cxx::__enable_if<true, double>::__type' {aka 'double'}
Language: C++

#include<bits/stdc++.h>
 
#define speed ios::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define watch(x) cout << (#x) << " is " << (x) << endl
#define pb push_back
#define mp make_pair
#define ll long long
#define ull unsigned long long
#define F first
#define S second
#define si set <int>



using namespace std;

int main(){speed;
	double n;
	cin >> n;
	int cnt = 0;
	for(int i = 0; i < n; ++i){
		if( n % i == 1) cnt++;
	}
	cout << cnt / n;
	}
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:23: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   22 |                 if( n % i == 1) cnt++;
      |                     ~ ^ ~
      |                     |   |
      |                     |   int
      |                     double
a.cc: At global scope:
a.cc:27:1: error: expected declaration before '}' token
   27 | }
      | ^
Language: C

#include<stdio.h>

int main(void)
{
  double N;
  
  scanf("%f",&N);
  
 if(N%2 == 0){
    N = (int)N;
    printf("%f",(N / 2) / N);
  }
  else{
    N = (int)N;
    printf("%f",(N - (N - 1) / 2) / N );
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:6: error: invalid operands to binary % (have 'double' and 'int')
    9 |  if(N%2 == 0){
      |      ^
Language: C++

#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<tuple>
#include<map>
#include<queue>
#include<sqrt>
#define rep(i, n) rep2(i,0,n)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
typedef long long ll;
using namespace std;

bool IsPrime(int num)
{
	if (num < 2) return false;
	else if (num == 2) return true;
	else if (num % 2 == 0) return false; // 偶数はあらかじめ除く

	 double sqrtNum = sqrt(num);
	for (int i = 3; i <= sqrtNum; i += 2)
	{
		if (num % i == 0)
		{
			// 素数ではない
			return false;
		}
	}

	// 素数である
	return true;
}

void prime(int n, queue<int> &q) {

	rep2(i, 2, n) {
		if (IsPrime(i)) q.push(i);
	}
}
int main()
{
	int a, b;
	cin >> a >> b;

	int n = min(a, b);
	queue<int> q;

	prime(n, q);

	int count = 1;

	int N = q.size();
	vector<int> p(N);
	rep(i, N) {
		int a = q.front(); q.pop();
		p.at(i) = a;
	}
	rep(i, N) {
		if (a% p.at(i) == 0 && b% p.at(i) == 0) ++count;
	}
	cout << count << endl;
}

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

#include <iostream>
using namespace std;

int main(){
  int a;
  cin >> a;
  double p;
  if(a % 2==0)
    p = 1/2;
  else
    p = (N+1)/(2*N);
  return p;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: 'N' was not declared in this scope
   11 |     p = (N+1)/(2*N);
      |          ^
Language: C

#include<stdio.h>

int main(void)
{
  double N;
  
  scanf("%f",&N);
  
 if(N%2 == 0){
    printf("%f",(N / 2) / N);
  }
  else{
    printf("%f",(N - (N - 1) / 2) / N );
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:6: error: invalid operands to binary % (have 'double' and 'int')
    9 |  if(N%2 == 0){
      |      ^
Language: C

#include<stdio.h>

int main(void)
{
  int N;
  int a;
  
  do{
  scanf("%d",&N);
  }while(N < 0 || 100 < N);
  
  if(N%2 == 0){
    printf("%f",(N / 2) / N);
  }
  else{
    a = ((int)N / 2);
    printf("%f",((N - a / N);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:29: error: expected ')' before ';' token
   17 |     printf("%f",((N - a / N);
      |                 ~           ^
      |                             )
main.c:17:30: error: expected ')' before '}' token
   17 |     printf("%f",((N - a / N);
      |           ~                  ^
      |                              )
   18 |   }
      |   ~                           
main.c:17:30: error: expected ';' before '}' token
   17 |     printf("%f",((N - a / N);
      |                              ^
      |                              ;
   18 |   }
      |   ~
Language: C

#include<stdio.h>

int main(void)
{
  int N;
  float a;
  
  do{
  scanf("%d",&N);
  }while(N < 0 || 100 < N);
  
  if(N%2 == 0){
    printf("%f",(N / 2) / N);
  }
  else{
    a = ((int)N / 2);
    printf("%f",((N - a / N);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:29: error: expected ')' before ';' token
   17 |     printf("%f",((N - a / N);
      |                 ~           ^
      |                             )
main.c:17:30: error: expected ')' before '}' token
   17 |     printf("%f",((N - a / N);
      |           ~                  ^
      |                              )
   18 |   }
      |   ~                           
main.c:17:30: error: expected ';' before '}' token
   17 |     printf("%f",((N - a / N);
      |                              ^
      |                              ;
   18 |   }
      |   ~
Language: C++

#include<stdio.h>
int main(){
  int A,B;
  scanf("%d %d",&A,&B);
  int a1,a2,b1,b2;
  a1=0;
  b1=0;
  for(i=1;i<=A;++i){
if(A%i=0){
a2=a1+1;
  a1=a2;
  C[a1]=A;
}
 for(i=1;i<=B;++i){
if(B%i=0){
b2=b1+1;
  b1=b2;
  D[b1]=B;
}
 for(a1=1;a1<=A;++a1){
   for(b1=1;b1<=B;++b1){
     if(C[a1]=D[b1]){
c2=c1+1;
       c1=c2;
       E[c1]=C[a1]
     }
   }
 }
   


Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: 'i' was not declared in this scope
    8 |   for(i=1;i<=A;++i){
      |       ^
a.cc:12:3: error: 'C' was not declared in this scope
   12 |   C[a1]=A;
      |   ^
a.cc:18:3: error: 'D' was not declared in this scope
   18 |   D[b1]=B;
      |   ^
a.cc:22:9: error: 'C' was not declared in this scope
   22 |      if(C[a1]=D[b1]){
      |         ^
a.cc:22:15: error: 'D' was not declared in this scope
   22 |      if(C[a1]=D[b1]){
      |               ^
a.cc:23:1: error: 'c2' was not declared in this scope; did you mean 'b2'?
   23 | c2=c1+1;
      | ^~
      | b2
a.cc:23:4: error: 'c1' was not declared in this scope; did you mean 'b1'?
   23 | c2=c1+1;
      |    ^~
      |    b1
a.cc:25:8: error: 'E' was not declared in this scope
   25 |        E[c1]=C[a1]
      |        ^
a.cc:28:3: error: expected '}' at end of input
   28 |  }
      |   ^
a.cc:14:19: note: to match this '{'
   14 |  for(i=1;i<=B;++i){
      |                   ^
a.cc:28:3: error: expected '}' at end of input
   28 |  }
      |   ^
a.cc:8:20: note: to match this '{'
    8 |   for(i=1;i<=A;++i){
      |                    ^
a.cc:28:3: error: expected '}' at end of input
   28 |  }
      |   ^
a.cc:2:11: note: to match this '{'
    2 | int main(){
      |           ^
Language: C

#include<stdio.h>

int main(void)
{
  int N;
  float a;
  
  do{
  scanf("%d",&N);
  }while(N < 0 || 100 < N);
  
  if(N%2 == 0){
    printf("%f",(N / 2) / N);
  }
  else{
    a = N / 2;
    printf("%f",((N - (int)a) / N);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:35: error: expected ')' before ';' token
   17 |     printf("%f",((N - (int)a) / N);
      |           ~                       ^
      |                                   )
main.c:17:36: error: expected ';' before '}' token
   17 |     printf("%f",((N - (int)a) / N);
      |                                    ^
      |                                    ;
   18 |   }
      |   ~
Language: C

#include<stdio.h>

int main(void)
{
  int N;
  double a;
  
  do{
  scanf("%d",&N);
  }while(N < 0 || 100 < N);
  
  if(N%2 == 0){
    printf("%f",(N / 2) / N);
  }
  else{
    a = N / 2;
    printf("%f",((N - (int)a) / N);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:35: error: expected ')' before ';' token
   17 |     printf("%f",((N - (int)a) / N);
      |           ~                       ^
      |                                   )
main.c:17:36: error: expected ';' before '}' token
   17 |     printf("%f",((N - (int)a) / N);
      |                                    ^
      |                                    ;
   18 |   }
      |   ~
Language: C

#include<stdio.h>

int main(void)
{
  int N;
  int a;
  
  do{
  scanf("%d",&N);
  }while(N < 0 || 100 < N);
  
  if(N%2 == 0){
    printf("%f",(N / 2) / N);
  }
  else{
    a = N / 2
    printf("%f",((N - (int)a) / N);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:14: error: expected ';' before 'printf'
   16 |     a = N / 2
      |              ^
      |              ;
   17 |     printf("%f",((N - (int)a) / N);
      |     ~~~~~~    
main.c:20:1: error: expected declaration or statement at end of input
   20 | }
      | ^
Language: C

#include<stdio.h>

int main(void)
{
  int N;
  int a;
  
  do{
  scanf("%d",&N);
  }while(N < 0 || 100 < N);
  
  if(N%2 == 0){
    printf("%f",(N / 2) / N);
  }
  else{
    
    printf("%f",(N - ((int)N / 2) / N);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:39: error: expected ')' before ';' token
   17 |     printf("%f",(N - ((int)N / 2) / N);
      |           ~                           ^
      |                                       )
main.c:17:40: error: expected ';' before '}' token
   17 |     printf("%f",(N - ((int)N / 2) / N);
      |                                        ^
      |                                        ;
   18 |   }
      |   ~