Language: C++

#include<iostream>
#include<cstdio>
#include<cctype>
using namespace std;
int main(){ 
    char ch[1200];
    for(int a=0;a<1200;a++){
        cin>>ch[a];
        if (ch[a]=='¥0') break;
        else if (islower(ch)==true){
            printf(%c,toupper(ch[a]));
        }
        else if  (isupper(ch)==true){
            printf(%c\n,tolower(ch[a]));
        }
        else printf(%c\n,ch[a]);
    }
}


Compiler output:
a.cc:9:20: warning: multi-character character constant [-Wmultichar]
    9 |         if (ch[a]=='¥0') break;
      |                    ^~~~
a.cc:14:22: error: stray '\' in program
   14 |             printf(%c\n,tolower(ch[a]));
      |                      ^
a.cc:16:23: error: stray '\' in program
   16 |         else printf(%c\n,ch[a]);
      |                       ^
a.cc: In function 'int main()':
a.cc:10:25: error: no matching function for call to 'islower(char [1200])'
   10 |         else if (islower(ch)==true){
      |                  ~~~~~~~^~~~
In file included from /usr/include/c++/14/cctype:42,
                 from /usr/include/c++/14/bits/localefwd.h:42,
                 from /usr/include/c++/14/ios:43,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/ctype.h:112:1: note: candidate: 'int islower(int)' (near match)
  112 | __exctype (islower);
      | ^~~~~~~~~
/usr/include/ctype.h:112:1: note:   conversion of argument 1 would be ill-formed:
a.cc:10:26: error: invalid conversion from 'char*' to 'int' [-fpermissive]
   10 |         else if (islower(ch)==true){
      |                          ^~
      |                          |
      |                          char*
In file included from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46:
/usr/include/c++/14/bits/locale_facets.h:2637:5: note: candidate: 'template<class _CharT> bool std::islower(_CharT, const locale&)'
 2637 |     islower(_CharT __c, const locale& __loc)
      |     ^~~~~~~
/usr/include/c++/14/bits/locale_facets.h:2637:5: note:   candidate expects 2 arguments, 1 provided
a.cc:11:20: error: expected primary-expression before '%' token
   11 |             printf(%c,toupper(ch[a]));
      |                    ^
a.cc:11:21: error: 'c' was not declared in this scope
   11 |             printf(%c,toupper(ch[a]));
      |                     ^
a.cc:13:26: error: no matching function for call to 'isupper(char [1200])'
   13 |         else if  (isupper(ch)==true){
      |                   ~~~~~~~^~~~
/usr/include/ctype.h:117:1: note: candidate: 'int isupper(int)' (near match)
  117 | __exctype (isupper);
      | ^~~~~~~~~
/usr/include/ctype.h:117:1: note:   conversion of argument 1 would be ill-formed:
a.cc:13:27: error: invalid conversion from 'char*' to 'int' [-fpermissive]
   13 |         else if  (isupper(ch)==true){
      |                           ^~
      |                           |
      |                           char*
/usr/include/c++/14/bits/locale_facets.h:2631:5: note: candidate: 'template<class _CharT> bool std::isupper(_CharT, const locale&)'
 2631 |     isupper(_CharT __c, const locale& __loc)
      |     ^~~~~~~
/usr/include/c++/14/bits/locale_facets.h:2631:5: note:   candidate expects 2 arguments, 1 provided
a.cc:14:20: error: expected primary-expression before '%' token
   14 |             printf(%c\n,tolower(ch[a]));
      |                    ^
a.cc:14:21: error: 'c' was not declared in this scope
   14 |             printf(%c\n,tolower(ch[a]));
      |                     ^
a.cc:16:21: error: expected primary-expression before '%' token
   16 |         else printf(%c\n,ch[a]);
      |                     ^
a.cc:16:22: error: 'c' was not declared in this scope
   16 |         else printf(%c\n,ch[a]);
      |                      ^