Language: C++

#include<bits/stdc++.h>
using namespace std;
#define int long long
#define fo(a,b) for(int a=0;a<b;a++)
#define Sort(a) sort(a.begin(),a.end())
#define rev(a) reverse(a.begin(),a.end())
#define fi first
#define se second
#define co(a) cout<<a<<endl
#define sz size()
#define bgn begin()
#define en end()
#define pb(a) push_back(a)
#define pop pop_back
template<class T>
 void cou(vector<vector<T>> a){
  int b=a.size();
  int c=a[0].size();
  fo(i,b){
    fo(j,c){
      cout<<a[i][j];
      if(j==c-1)
        cout<<endl;
      else
        cout<<' ';
    }
  }
}
//template<>
 void cou(vector<vector<char>> a){
  int b=a.size();
  int c=a[0].size();
  fo(i,b){
    fo(j,c){
      cout<<a[i][j];
      if(j==c-1)
        cout<<endl;
      else
        cout<<' ';
    }
  }
}
 int wari(int a,int b) {
   if(a%b==0)
     return a/b;
   else
     return a/b+1;
 }
 int keta(int a){
  double b=a;
  b=log10(b);
  int c=b;
  return c+1;
 }
 int souwa(int a){
  return a*(a+1)/2;
 }
 int lcm(int a,int b){
  int d=a,e=b,f;
  if(a<b)
    swap(a,b);
  int c,m=1;
  while(m){
    c=a%b;
    if(c==0){
       f=b;
      m--;
    }
    else{
      a=b;
      b=c;
 }
  }
  return d*e/f;
    }
  int gcm(int a,int b){
      int d=a,e=b,f;
  if(a<b)
    swap(a,b);
  int c,m=1;
  while(m){
    c=a%b;
    if(c==0){
       f=b;
      m--;
    }
    else{
      a=b;
      b=c;
 }
  }
  return f;
  }
 bool prime(int a){
   if(a<2)
     return false;
   else if(a==2)
     return true;
   else if(a%2==0)
     return false;
   double b=sqrt(a);
    for(int i=3;i<=b;i+=2){
      if(a%i==0){
        return false;
      }
    }
   return true;
 }
signed main(){
  vector<string> weather(3);
  fo (3,i) cin>>weather[i];
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define fo(a,b) for(int a=0;a<b;a++)
#define Sort(a) sort(a.begin(),a.end())
#define rev(a) reverse(a.begin(),a.end())
#define fi first
#define se second
#define co(a) cout<<a<<endl
#define sz size()
#define bgn begin()
#define en end()
#define pb(a) push_back(a)
#define pop pop_back
template<class T>
 void cou(vector<vector<T>> a){
  int b=a.size();
  int c=a[0].size();
  fo(i,b){
    fo(j,c){
      cout<<a[i][j];
      if(j==c-1)
        cout<<endl;
      else
        cout<<' ';
    }
  }
}
//template<>
 void cou(vector<vector<char>> a){
  int b=a.size();
  int c=a[0].size();
  fo(i,b){
    fo(j,c){
      cout<<a[i][j];
      if(j==c-1)
        cout<<endl;
      else
        cout<<' ';
    }
  }
}
 int wari(int a,int b) {
   if(a%b==0)
     return a/b;
   else
     return a/b+1;
 }
 int keta(int a){
  double b=a;
  b=log10(b);
  int c=b;
  return c+1;
 }
 int souwa(int a){
  return a*(a+1)/2;
 }
 int lcm(int a,int b){
  int d=a,e=b,f;
  if(a<b)
    swap(a,b);
  int c,m=1;
  while(m){
    c=a%b;
    if(c==0){
       f=b;
      m--;
    }
    else{
      a=b;
      b=c;
 }
  }
  return d*e/f;
    }
  int gcm(int a,int b){
      int d=a,e=b,f;
  if(a<b)
    swap(a,b);
  int c,m=1;
  while(m){
    c=a%b;
    if(c==0){
       f=b;
      m--;
    }
    else{
      a=b;
      b=c;
 }
  }
  return f;
  }
 bool prime(int a){
   if(a<2)
     return false;
   else if(a==2)
     return true;
   else if(a%2==0)
     return false;
   double b=sqrt(a);
    for(int i=3;i<=b;i+=2){
      if(a%i==0){
        return false;
      }
    }
   return true;
 }
signed main(){
  vector<string> weather(3);
  for(int i=0;i<3;i=i){
    cin>>weather[i];
  }
  if(weather[i]=="Sunny")
    cout<<"Cloudy"<<endl;
  if else (weather[i]=="Coudy")
    cout<<"Rainy"<<endl;
  else (weather[i]=="Rainy")
    cout<<"Sunny"<<endl;
  
}

  
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:111:7: error: expected unqualified-id before numeric constant
  111 |   fo (3,i) cin>>weather[i];
      |       ^
a.cc:4:25: note: in definition of macro 'fo'
    4 | #define fo(a,b) for(int a=0;a<b;a++)
      |                         ^
a.cc:111:7: error: expected ';' before numeric constant
  111 |   fo (3,i) cin>>weather[i];
      |       ^
a.cc:4:25: note: in definition of macro 'fo'
    4 | #define fo(a,b) for(int a=0;a<b;a++)
      |                         ^
a.cc:111:7: error: lvalue required as left operand of assignment
  111 |   fo (3,i) cin>>weather[i];
      |       ^
a.cc:4:25: note: in definition of macro 'fo'
    4 | #define fo(a,b) for(int a=0;a<b;a++)
      |                         ^
a.cc:111:9: error: 'i' was not declared in this scope; did you mean 'fi'?
  111 |   fo (3,i) cin>>weather[i];
      |         ^
a.cc:4:31: note: in definition of macro 'fo'
    4 | #define fo(a,b) for(int a=0;a<b;a++)
      |                               ^
a.cc:4:32: error: expected ')' before ';' token
    4 | #define fo(a,b) for(int a=0;a<b;a++)
      |                    ~           ^
a.cc:111:3: note: in expansion of macro 'fo'
  111 |   fo (3,i) cin>>weather[i];
      |   ^~
a.cc:111:7: error: lvalue required as increment operand
  111 |   fo (3,i) cin>>weather[i];
      |       ^
a.cc:4:33: note: in definition of macro 'fo'
    4 | #define fo(a,b) for(int a=0;a<b;a++)
      |                                 ^
a.cc:126:1: error: a template declaration cannot appear at block scope
  126 | template<class T>
      | ^~~~~~~~
a.cc:154:24: error: a function-definition is not allowed here before '{' token
  154 |  int wari(int a,int b) {
      |                        ^
a.cc:160:17: error: a function-definition is not allowed here before '{' token
  160 |  int keta(int a){
      |                 ^
a.cc:166:18: error: a function-definition is not allowed here before '{' token
  166 |  int souwa(int a){
      |                  ^
a.cc:169:22: error: a function-definition is not allowed here before '{' token
  169 |  int lcm(int a,int b){
      |                      ^
a.cc:187:23: error: a function-definition is not allowed here before '{' token
  187 |   int gcm(int a,int b){
      |                       ^
a.cc:205:19: error: a function-definition is not allowed here before '{' token
  205 |  bool prime(int a){
      |                   ^
a.cc:220:12: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
  220 | signed main(){
      |            ^~
a.cc:220:12: note: remove parentheses to default-initialize a variable
  220 | signed main(){
      |            ^~
      |            --
a.cc:220:12: note: or replace parentheses with braces to value-initialize a variable
a.cc:220:14: error: a function-definition is not allowed here before '{' token
  220 | signed main(){
      |              ^