Language: C++

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

int main(){
  std::string a;
  std::string s;
  int ad;
  std::cin >> a;
  if(a == "SUN"){
    s == "日曜日";
    ad == 7;
  }
  else if(a=="MON"){
    s == "月曜日";
    ad == 6;
  }
  else if(a=="TUE"){
    s == "火曜日";
    ad == 5;
  }
  else if(a=="WED"){
    s == "水曜日";
    ad == 4;
  }
  else if(a=="THU"){
    s == "木曜日";
    ad == 3;
  }
  else if(a=="FRI"){
    s == "金曜日";
    ad == 2;
  }
  else if(a=="SAT"){
    s == "土曜日";
    ad == 1;
  }
  std::string s1 == "今日は";
  std::string s2 == "です。よって、次の日曜日は";
  std::string s3 == "日後です。";
  std::cout << s1 + s + s2 + ad + s3 << std::endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:11:7: 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]
   11 |     s == "日曜日";
      |     ~~^~~~~~~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:2:
/usr/include/c++/14/bits/basic_string.h:3772:5: note: declared here
 3772 |     operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
a.cc:15:7: 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]
   15 |     s == "月曜日";
      |     ~~^~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3772:5: note: declared here
 3772 |     operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
a.cc:19:7: 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]
   19 |     s == "火曜日";
      |     ~~^~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3772:5: note: declared here
 3772 |     operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
a.cc:23:7: 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]
   23 |     s == "水曜日";
      |     ~~^~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3772:5: note: declared here
 3772 |     operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
a.cc:27:7: 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]
   27 |     s == "木曜日";
      |     ~~^~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3772:5: note: declared here
 3772 |     operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
a.cc:31:7: 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]
   31 |     s == "金曜日";
      |     ~~^~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3772:5: note: declared here
 3772 |     operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
a.cc:35:7: 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]
   35 |     s == "土曜日";
      |     ~~^~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3772:5: note: declared here
 3772 |     operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
a.cc:38:18: error: expected initializer before '==' token
   38 |   std::string s1 == "今日は";
      |                  ^~
a.cc:39:18: error: expected initializer before '==' token
   39 |   std::string s2 == "です。よって、次の日曜日は";
      |                  ^~
a.cc:40:18: error: expected initializer before '==' token
   40 |   std::string s3 == "日後です。";
      |                  ^~
a.cc:41:16: error: 's1' was not declared in this scope; did you mean 's'?
   41 |   std::cout << s1 + s + s2 + ad + s3 << std::endl;
      |                ^~
      |                s
a.cc:41:25: error: 's2' was not declared in this scope; did you mean 's'?
   41 |   std::cout << s1 + s + s2 + ad + s3 << std::endl;
      |                         ^~
      |                         s
a.cc:41:35: error: 's3' was not declared in this scope; did you mean 's'?
   41 |   std::cout << s1 + s + s2 + ad + s3 << std::endl;
      |                                   ^~
      |                                   s