Go: package main

import "fmt"

func main() {
	week := []string{"fri", "sat", "sun", "mon", "tue", "wed", "thu"}

	var day int
	fmt.Scan(&day)
	dayOfWeek := -1
	for i := 0; i < day; i++ {
		if dayOfWeek == 6 {
			dayOfWeek = -1
		}
		dayOfWeek++
	}
	fmt.Println(week[dayOfWeek])
}

C++: #include <bits/stdc++.h>
typedef long long ll;
#define ALL(a) a, a+sizeof(a)/sizeof(a[0])
using namespace std;
ll gcd(ll n, ll m) {
	if (m == 0) return n;
	return gcd(m, n % m);
}

ll lcm(ll n, ll m) {
	return m / gcd(n, m) * n;
}

int main(void) {
	int x;
	scanf("%d", &x);
	switch (x%7){
		case 1:
			cout << "fri" << endl;
			break;
		case 2:
			cout << "sat" << endl;
			break;
		case 3:
			cout << "sun" << endl;
			break;
		case 4:
			cout << "mon" << endl;
			break;
		case 5:
			cout << "tue" << endl;
			break;
		case 6:
			cout << "wed" << endl;
			break;
		case 0:
			cout << "thu" << endl;
			break;
		default:
			break;
	}
	return 0;
}

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

int main()
{
    int x;
    cin >> x;
    if (x % 7 == 0)
        cout << "thu" << endl;
    else if (x % 7 == 1)
        cout << "fri" << endl;
    else if (x % 7 == 2)
        cout << "sat" << endl;
    else if (x % 7 == 3)
        cout << "sun" << endl;
    else if (x % 7 == 4)
        cout << "mon" << endl;
    else if (x % 7 == 5)
        cout << "tue" << endl;
    else if (x % 7 == 6)
        cout << "wed" << endl;
}

C++: # include <iostream>
# include <algorithm>
# include <vector>
# include <string>
# include <set>
# include <map>
# include <cmath>
# include <iomanip>
# include <functional>
# include <utility>
# include <stack>
# include <queue>
# include <list>
# include <bitset>
# include <complex>
#include<limits.h>
#include<random>
#include<deque>
#include<cstdio>
#include<fstream>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const int N = 2000100;
const int mod = (int)pow(10, 9) + 7;
const ll INF = 1LL << 60;
#define rep(i,n) for(ll i=(ll)0;i<(ll)n;++i)
#define ALL(x) x.begin(),x.end()
#define pp pair<ll,ll>
#define ppp pair<pp,ll>
#define fi first
#define se second
#define pb push_back
#define fix(n) fixed<<setprecision(n)
#define itr vector<ll>::iterator
#define print(s) cout<<s<<endl
#define inp(s) cin>>s
string yn(bool b) { return (b ? "Yes" : "No"); }
string YN(bool b) { return (b ? "YES" : "NO"); }
ll x;
string s[] = { "fri","sat","sun","mon","tue","wed","thu" };
int main(){
	cin >> x;
	cout << s[(x+6) % 7] << endl;
	return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<cmath>
#include<algorithm>
#include<string>
#include<vector>

using namespace std;

int main(){
	int x;
	string w[]={"thu","fri","sat","sun","mon","tue","wed"};
	scanf("%d",&x);
	x=x%7;
	printf("%s\n",w[x].c_str());
}

C++: #include <iostream>
using namespace std;

int main(){
  int X;
  cin >> X;
  switch (X % 7){
    case 0:
      cout << "thu" << endl;
      break;
    case 1:
      cout << "fri" << endl;
     break;
    case 2:
      cout << "sat" << endl;
      break;
    case 3:
      cout << "sun" << endl;
      break;
    case 4:
      cout << "mon" << endl;
      break;
    case 5:
      cout << "tue" << endl;
      break;
    default:
      cout << "wed" << endl;
  }
  return 0;
}

C++: #include<iostream>
using namespace std;

int main(){
  int x;
  cin >> x;
  int c = x % 7;
  if(c == 1){
    cout << "fri" << endl;
  }else if(c == 2){
    cout << "sat" << endl;
  }else if(c == 3){
    cout << "sun" << endl;
  }else if(c == 4){
    cout << "mon" << endl;
  }else if(c == 5){
    cout << "tue" << endl;
  }else if(c == 6){
    cout << "wed" << endl;
  }else if(c == 0){
    cout << "thu" << endl;
  }
}

C++: #include <iostream>
using namespace std;

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

  if (X % 7 == 4) cout << "mon" << endl;
  else if (X % 7 == 5) cout << "tue" << endl;
  else if (X % 7 == 6) cout << "wed" << endl;
  else if (X % 7 == 0) cout << "thu" << endl;
  else if (X % 7 == 1) cout << "fri" << endl;
  else if (X % 7 == 2) cout << "sat" << endl;
  else cout << "sun" << endl;

  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main() {
    int X;
    cin >> X;
    if (X%7==0){
        cout << "thu" << endl;
    } else if (X%7==1){
        cout << "fri" << endl;
    } else if (X%7==2){
        cout << "sat" << endl;
    } else if (X%7==3){
        cout << "sun" << endl;
    } else if (X%7==4){
        cout << "mon" << endl;
    } else if (X%7==5){
        cout << "tue" << endl;
    } else {
        cout << "wed" << endl;
    }
}

C++: #include <iostream>
using namespace std;char w[]="thufrisatsunmontuewed";int main(){int i;cin >> i;cout << w[(i%7)*3] << w[(i%7)*3+1] << w[(i%7)*3+2] << endl;}

C++: #include "bits/stdc++.h"
using namespace std;
int main()
{
    string d[7] = {"mon", "tue", "wed", "thu", "fri", "sat", "sun"};
    int x;
    cin >> x;
    cout << d[(x + 3) % 7] << "\n";
}

C++: #include<iostream>
using namespace std;

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

  int sa=X-9;
  if(sa>=0){
    switch(sa%7){
      case 0:cout<<"sat";break;
      case 1:cout<<"sun";break;
      case 2:cout<<"mon";break;
      case 3:cout<<"tue";break;
      case 4:cout<<"wed";break;
      case 5:cout<<"thu";break;
      case 6:cout<<"fri";break;
    }
  }
  else{
    sa*=-1;
    switch(sa%7){
      cout 0:cout<<"sat";break;
      case 1:cout<<"fri";break;
      case 2:cout<<"thu";break;
      case 3:cout<<"wed";break;
      case 4:cout<<"tue";break;
      case 5:cout<<"mon";break;
      case 6:cout<<"sun";break;
    }
  }
  cout<<endl;
}

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

int main(){
    int N;
    cin >> N;
    string ans;
    switch(N%7){
        case 0 : ans = "thu"; break;
        case 1 : ans = "fri"; break;
        case 2 : ans = "sat"; break;
        case 3 : ans = "sun"; break;
        case 4 : ans = "mon"; break;
        case 5 : ans = "tue"; break;
        case 6 : ans = "wed"; break;
    }
    cout << ans << endl;
}

C++: #include <iostream>
using namespace std;
int main(void){
    // Your code here!
int x;
cin>>x;
int Day = x%7;
if(Day == 0){
             cout<<"thu"<<endl;
            }
else if(Day == 1){
             cout<<"fri"<<endl;
            }
else if(Day == 2){
             cout<<"sat"<<endl;
            }
else if(Day == 3){
             cout<<"sun"<<endl;
            }
else if(Day == 4){
             cout<<"mon"<<endl;
            }
else if(Day == 5){
             cout<<"tue"<<endl;
            }
else {
             cout<<"wed"<<endl;            
}
}

C++: #include<bits/stdc++.h>
#define all(vec) vec.begin(),vec.end()
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
const ll MOD=10000000;
const ll INF=1000000001;
const ll LINF=4000000000000000010;
const double EPS=1e-9;
int dx[5]={0,1,0,-1,0};
int dy[5]={1,0,-1,0,0};
int main(){
    int x;cin>>x;
    int d[31];
    d[9]=5;
    for(int i=8;i>=1;i--){
        d[i]=(d[i+1]-1+7)%7;
    }
    for(int i=10;i<=30;i++){
        d[i]=(d[i-1]+1)%7;
    }
    if(d[x]==0){
        cout<<"mon"<<endl;
    }else if(d[x]==1){
        cout<<"tue"<<endl;
    }else if(d[x]==2){
        cout<<"wed"<<endl;
    }else if(d[x]==3){
        cout<<"thu"<<endl;
    }else if(d[x]==4){
        cout<<"fri"<<endl;
    }else if(d[x]==5){
        cout<<"sat"<<endl;
    }else{
        cout<<"sun"<<endl;
    }
}

C++: #include <stdio.h>
int main(void){
	int x,sugai;
	scanf("%d",&x);
	sugai=x%7;
	switch(sugai){
		case 2:
			printf("sat");
			break;
		case 3:
			printf("sun");
			break;
		case 4:
			printf("mon");
			break;
		case 5:
			printf("tue\n");
			break;
		case 6:
			printf("wed");
			break;
		case 0:
			printf("thu");
			break;
		case 1:
			printf("fri");
			break;
		default:
			break;
	}
	return 0;
}