Language: C++

Last login: Mon Apr 17 14:18:01 on ttys001
install-no-MacBook-Air:~ g-2019$ rsync -auvz  install@192.168.1.40:Downloads/Symantec_Endpoint_Protection_12.1.6_MP6_Mac_Client_JP  ~/Downloads/
Password:
  [????????\???2017/04/17 16:40:47]
Last login: Mon Apr 17 16:40:42 on console
Restored session: 2017??´ 4???17??\ ????????\ 16???34???11?§? JST
install-no-MacBook-Air:~ g-2019$ emacs

[1]+  Stopped                 emacs
install-no-MacBook-Air:~ g-2019$ mkdir zemi
install-no-MacBook-Air:~ g-2019$ ls
Applications			Movies
Desktop				Music
Documents			Pictures
Downloads			Public
Google ????????????			zemi
Library
install-no-MacBook-Air:~ g-2019$ cd zemi
install-no-MacBook-Air:zemi g-2019$ ls
install-no-MacBook-Air:zemi g-2019$ pwe
-bash: pwe: command not found
install-no-MacBook-Air:zemi g-2019$ pwd
/Users/g-2019/zemi
install-no-MacBook-Air:zemi g-2019$ mkdir 20170417
install-no-MacBook-Air:zemi g-2019$ cd 20170417/
install-no-MacBook-Air:20170417 g-2019$ pwd
/Users/g-2019/zemi/20170417
install-no-MacBook-Air:20170417 g-2019$ cd desktop
-bash: cd: desktop: No such file or directory
install-no-MacBook-Air:20170417 g-2019$ cd Desktop
-bash: cd: Desktop: No such file or directory
install-no-MacBook-Air:20170417 g-2019$ emacs hello.cpp

[2]+  Stopped                 emacs hello.cpp
install-no-MacBook-Air:20170417 g-2019$ fg
emacs hello.cpp

[2]+  Stopped                 emacs hello.cpp
install-no-MacBook-Air:20170417 g-2019$ ls
hello.cpp
install-no-MacBook-Air:20170417 g-2019$ g++ -o hello hello.cpp
install-no-MacBook-Air:20170417 g-2019$ ./a.exe
-bash: ./a.exe: No such file or directory
install-no-MacBook-Air:20170417 g-2019$ ./a.out
-bash: ./a.out: No such file or directory
install-no-MacBook-Air:20170417 g-2019$ g++ -o hello.cpp
clang: error: no input files
install-no-MacBook-Air:20170417 g-2019$ g++ hello.cpp
install-no-MacBook-Air:20170417 g-2019$ ./a.out
HELLO World!
install-no-MacBook-Air:20170417 g-2019$ fg
emacs hello.cpp

[2]+  Stopped                 emacs hello.cpp
install-no-MacBook-Air:20170417 g-2019$ g++ hello.cpp
install-no-MacBook-Air:20170417 g-2019$ ./a.out
Hello World!
install-no-MacBook-Air:20170417 g-2019$ emacs sum.cpp

[3]+  Stopped                 emacs sum.cpp
install-no-MacBook-Air:20170417 g-2019$ g++ sum 
clang: error: no such file or directory: 'sum'
clang: error: no input files
install-no-MacBook-Air:20170417 g-2019$ g++ sum.cpp
sum.cpp:13:9: error: no member named 'cont' in namespace 'std'
  std ::cont >> "sum =" << sum <<std ::endl;
  ~~~~~~^
1 error generated.
install-no-MacBook-Air:20170417 g-2019$ fg
emacs sum.cpp

[3]+  Stopped                 emacs sum.cpp
install-no-MacBook-Air:20170417 g-2019$ g++ sum.cpp
sum.cpp:13:9: error: no member named 'cont' in namespace 'std'; did you mean
      'cout'?
  std ::cont << "sum =" << sum <<std ::endl;
  ~~~~~~^~~~
        cout
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iostream:54:33: note: 
      'cout' declared here
extern _LIBCPP_FUNC_VIS ostream cout;
                                ^
1 error generated.
install-no-MacBook-Air:20170417 g-2019$ fg
emacs sum.cpp

[3]+  Stopped                 emacs sum.cpp
install-no-MacBook-Air:20170417 g-2019$ g++ sum.cpp
install-no-MacBook-Air:20170417 g-2019$ ls
a.out		hello.cpp	sum.cpp
hello		hello.cpp~	sum.cpp~
install-no-MacBook-Air:20170417 g-2019$ g++ -Wall sum.cpp
install-no-MacBook-Air:20170417 g-2019$ ./a.out
4
5
sum =9
install-no-MacBook-Air:20170417 g-2019$ ./a.out
3 4
sum =7
install-no-MacBook-Air:20170417 g-2019$ 3
-bash: 3: command not found
install-no-MacBook-Air:20170417 g-2019$ 4
-bash: 4: command not found
install-no-MacBook-Air:20170417 g-2019$ ./a.out
3
4
sum =7
install-no-MacBook-Air:20170417 g-2019$ g++ -Wall sum.cpp
install-no-MacBook-Air:20170417 g-2019$ ./a.out
4
3
sum =7
install-no-MacBook-Air:20170417 g-2019$ fg
emacs sum.cpp

[3]+  Stopped                 emacs sum.cpp
install-no-MacBook-Air:20170417 g-2019$ g++ -Wall sum.cpp
install-no-MacBook-Air:20170417 g-2019$ fg
emacs sum.cpp

[3]+  Stopped                 emacs sum.cpp
install-no-MacBook-Air:20170417 g-2019$ ./a.out
3 4
sum =
install-no-MacBook-Air:20170417 g-2019$ fg
emacs sum.cpp

[3]+  Stopped                 emacs sum.cpp
install-no-MacBook-Air:20170417 g-2019$ fg
emacs sum.cpp

[3]+  Stopped                 emacs sum.cpp
install-no-MacBook-Air:20170417 g-2019$ g++ -Wall sum.cpp
sum.cpp:15:20: error: 'sum' is not a class, namespace, or enumeration
  cout << "sum ="<<sum ::endl;
                   ^
sum.cpp:9:7: note: 'sum' declared here
  int sum;
      ^
1 error generated.
install-no-MacBook-Air:20170417 g-2019$ g++ -Wall sum.cppfg
clang: error: no such file or directory: 'sum.cppfg'
clang: error: no input files
install-no-MacBook-Air:20170417 g-2019$ fg
emacs sum.cpp

[3]+  Stopped                 emacs sum.cpp
install-no-MacBook-Air:20170417 g-2019$ g++ -Wall sum.cpp
install-no-MacBook-Air:20170417 g-2019$ ./a.out
3 4 
sum =7
install-no-MacBook-Air:20170417 g-2019$ emacs 10006.cpp

[4]+  Stopped                 emacs 10006.cpp
install-no-MacBook-Air:20170417 g-2019$ emacs in 

[5]+  Stopped                 emacs in
install-no-MacBook-Air:20170417 g-2019$ fg 1
emacs	(wd: ~)

[1]+  Stopped                 emacs  (wd: ~)
(wd now: ~/zemi/20170417)
install-no-MacBook-Air:20170417 g-2019$ fg
emacs	(wd: ~)

[1]+  Stopped                 emacs  (wd: ~)
(wd now: ~/zemi/20170417)
install-no-MacBook-Air:20170417 g-2019$ jobs
[1]+  Stopped                 emacs  (wd: ~)
[2]   Stopped                 emacs hello.cpp
[3]   Stopped                 emacs sum.cpp
[4]   Stopped                 emacs 10006.cpp
[5]-  Stopped                 emacs in
install-no-MacBook-Air:20170417 g-2019$ fg 5 
emacs in
install-no-MacBook-Air:20170417 g-2019$ fg 4
emacs 10006.cpp

[4]+  Stopped                 emacs 10006.cpp
install-no-MacBook-Air:20170417 g-2019$ g++ -Wall 10006.cpp
10006.cpp:12:21: error: expected ';' after expression
    cout <<"Case"<<i ":"<<x ;
                    ^
                    ;
10006.cpp:12:25: error: invalid operands to binary expression ('const char *'
      and 'int')
    cout <<"Case"<<i ":"<<x ;
                     ~~~^ ~
2 errors generated.
install-no-MacBook-Air:20170417 g-2019$ fg
emacs 10006.cpp

[4]+  Stopped                 emacs 10006.cpp
install-no-MacBook-Air:20170417 g-2019$ g++ -Wall 10006.cpp
10006.cpp:12:20: warning: variable 'i' is uninitialized when used here
      [-Wuninitialized]
    cout <<"Case"<<i <<":"<<x ;
                   ^
10006.cpp:7:12: note: initialize the variable 'i' to silence this warning
  int x , i ;
           ^
            = 0
10006.cpp:7:7: warning: variable 'x' is used uninitialized whenever function
      'main' is called [-Wsometimes-uninitialized]
  int x , i ;
  ~~~~^
10006.cpp:9:10: note: uninitialized use occurs here
  while (x != 0){
         ^
10006.cpp:7:8: note: initialize the variable 'x' to silence this warning
  int x , i ;
       ^
        = 0
2 warnings generated.
install-no-MacBook-Air:20170417 g-2019$ fg
emacs 10006.cpp

[4]+  Stopped                 emacs 10006.cpp
install-no-MacBook-Air:20170417 g-2019$ g++ -Wall 10006.cpp
install-no-MacBook-Air:20170417 g-2019$ ./a.out
3
Case1:34
Case2:4^C
install-no-MacBook-Air:20170417 g-2019$ ./a.out < in > 
-bash: syntax error near unexpected token `newline'
install-no-MacBook-Air:20170417 g-2019$ ./a.out < in 
Case1:3Case2:5Case3:11Case4:7Case5:8Case6:19Case7:0install-no-MacBook-Air:20170417 g-2019$ fg
emacs 10006.cpp

[4]+  Stopped                 emacs 10006.cpp
install-no-MacBook-Air:20170417 g-2019$ g++ -Wall 10006.cpp
install-no-MacBook-Air:20170417 g-2019$ ./a.out < in 
Case1:3
Case2:5
Case3:11
Case4:7
Case5:8
Case6:19
Case7:0
install-no-MacBook-Air:20170417 g-2019$ fg
emacs 10006.cpp

[4]+  Stopped                 emacs 10006.cpp
install-no-MacBook-Air:20170417 g-2019$ fg
emacs 10006.cpp

[4]+  Stopped                 emacs 10006.cpp
install-no-MacBook-Air:20170417 g-2019$ g++ -Wall 10006.cpp
10006.cpp:13:9: warning: expression result unused [-Wunused-value]
    cin << x;
    ~~~ ^  ~
1 warning generated.
install-no-MacBook-Air:20170417 g-2019$ fg
emacs 10006.cpp

[4]+  Stopped                 emacs 10006.cpp
install-no-MacBook-Air:20170417 g-2019$ g++ -Wall 10006.cpp
install-no-MacBook-Air:20170417 g-2019$ ./a.out < in 
Case1:3
Case2:5
Case3:11
Case4:7
Case5:8
Case6:19
install-no-MacBook-Air:20170417 g-2019$ fg
emacs 10006.cpp

[4]+  Stopped                 emacs 10006.cpp
install-no-MacBook-Air:20170417 g-2019$ emacs 10011.cpp

[5]+  Stopped                 emacs 10011.cpp
install-no-MacBook-Air:20170417 g-2019$ emacs in 

[6]+  Stopped                 emacs in
install-no-MacBook-Air:20170417 g-2019$ g++ -Wall 10011.cpp
10011.cpp:14:16: error: expected ';' after expression
    cin >> a[i]
               ^
               ;
10011.cpp:17:8: warning: expression result unused [-Wunused-value]
  for (n ; n >0 ; n--){
       ^
1 warning and 1 error generated.
install-no-MacBook-Air:20170417 g-2019$ fg
emacs in

[6]+  Stopped                 emacs in
install-no-MacBook-Air:20170417 g-2019$ job
-bash: job: command not found
install-no-MacBook-Air:20170417 g-2019$ jobs
[1]   Stopped                 emacs  (wd: ~)
[2]   Stopped                 emacs hello.cpp
[3]   Stopped                 emacs sum.cpp
[4]   Stopped                 emacs 10006.cpp
[5]-  Stopped                 emacs 10011.cpp
[6]+  Stopped                 emacs in
install-no-MacBook-Air:20170417 g-2019$ fg 5
emacs 10011.cpp

[5]+  Stopped                 emacs 10011.cpp
install-no-MacBook-Air:20170417 g-2019$ fg
emacs 10011.cpp

[5]+  Stopped                 emacs 10011.cpp
install-no-MacBook-Air:20170417 g-2019$ fg
emacs 10011.cpp

[5]+  Stopped                 emacs 10011.cpp
install-no-MacBook-Air:20170417 g-2019$ g++ -Wall 10011.cpp
10011.cpp:17:8: warning: expression result unused [-Wunused-value]
  for (n ; n >0 ; n--){
       ^
1 warning generated.
install-no-MacBook-Air:20170417 g-2019$ fg
emacs 10011.cpp

[5]+  Stopped                 emacs 10011.cpp
install-no-MacBook-Air:20170417 g-2019$ g++ -Wall 10011.cpp
10011.cpp:17:8: warning: expression result unused [-Wunused-value]
  for (n ; n >0 ; n--){
       ^
1 warning generated.
install-no-MacBook-Air:20170417 g-2019$ ls
10006.cpp	10011.cpp~	hello.cpp	in~
10006.cpp~	a.out		hello.cpp~	sum.cpp
10011.cpp	hello		in		sum.cpp~
install-no-MacBook-Air:20170417 g-2019$ ,.a
-bash: ,.a: command not found
install-no-MacBook-Air:20170417 g-2019$ 
install-no-MacBook-Air:20170417 g-2019$ ./a.out < in 
97854433install-no-MacBook-Air:20170417 g-2019$ fg
emacs 10011.cpp

[5]+  Stopped                 emacs 10011.cpp
install-no-MacBook-Air:20170417 g-2019$ g++ -Wall 10011.cpp
10011.cpp:17:8: warning: expression result unused [-Wunused-value]
  for (n ; n >0 ; n--){
       ^
1 warning generated.
install-no-MacBook-Air:20170417 g-2019$ ./a.out < in 
 9 7 8 5 4 4 3 3
install-no-MacBook-Air:20170417 g-2019$ fg
emacs 10011.cpp

[5]+  Stopped                 emacs 10011.cpp
install-no-MacBook-Air:20170417 g-2019$ g++ -Wall 10011.cpp
install-no-MacBook-Air:20170417 g-2019$ ./a.out < in 
 9 7 8 5 4 4 3 3
install-no-MacBook-Air:20170417 g-2019$ fg
emacs 10011.cpp

[5]+  Stopped                 emacs 10011.cpp
install-no-MacBook-Air:20170417 g-2019$ fg
emacs 10011.cpp

[5]+  Stopped                 emacs 10011.cpp
install-no-MacBook-Air:20170417 g-2019$ g++ -Wall 10011.cpp
10011.cpp:20:13: error: use of undeclared identifier 'i'
  cout << a[i] << endl;
            ^
1 error generated.
install-no-MacBook-Air:20170417 g-2019$ fg
emacs 10011.cpp

[5]+  Stopped                 emacs 10011.cpp
install-no-MacBook-Air:20170417 g-2019$ g++ -Wall 10011.cpp
10011.cpp:20:3: error: use of undeclared identifier 'i'
  i-- ;
  ^
10011.cpp:21:13: error: use of undeclared identifier 'i'
  cout << a[i] << endl;
            ^
2 errors generated.
install-no-MacBook-Air:20170417 g-2019$ ./a.out < in 
 9 7 8 5 4 4 3 3
install-no-MacBook-Air:20170417 g-2019$ fg
emacs 10011.cpp

[5]+  Stopped                 emacs 10011.cpp
install-no-MacBook-Air:20170417 g-2019$ g++ -Wall 10011.cpp
10011.cpp:20:3: error: use of undeclared identifier 'i'
  i-- ;
  ^
10011.cpp:21:13: error: use of undeclared identifier 'i'
  cout >> a[i] >> endl;
            ^
2 errors generated.
install-no-MacBook-Air:20170417 g-2019$ ./a.out < in 
 9 7 8 5 4 4 3 3
install-no-MacBook-Air:20170417 g-2019$ fg
emacs 10011.cpp

[5]+  Stopped                 emacs 10011.cpp
install-no-MacBook-Air:20170417 g-2019$ g++ -Wall 10011.cpp
10011.cpp:20:3: error: use of undeclared identifier 'i'
  i-- ;
  ^
10011.cpp:21:12: error: use of undeclared identifier 'i'
  cout <<a[i] << endl;
           ^
2 errors generated.
install-no-MacBook-Air:20170417 g-2019$ fg
emacs 10011.cpp

[5]+  Stopped                 emacs 10011.cpp
install-no-MacBook-Air:20170417 g-2019$ g++ -Wall 10011.cpp
install-no-MacBook-Air:20170417 g-2019$ ./a.out < in 
 9 7 8 5 4 4 30
install-no-MacBook-Air:20170417 g-2019$ fg
emacs 10011.cpp

[5]+  Stopped                 emacs 10011.cpp
install-no-MacBook-Air:20170417 g-2019$ g++ -Wall 10011.cpp
install-no-MacBook-Air:20170417 g-2019$ ./a.out < in 
 9 7 8 5 4 4 33
install-no-MacBook-Air:20170417 g-2019$ fg
emacs 10011.cpp

[5]+  Stopped                 emacs 10011.cpp
install-no-MacBook-Air:20170417 g-2019$ g++ -Wall 10011.cpp
install-no-MacBook-Air:20170417 g-2019$ ./a.out < in 
 9 7 8 5 4 4 3 3
install-no-MacBook-Air:20170417 g-2019$ fg
emacs 10011.cpp

[5]+  Stopped                 emacs 10011.cpp
install-no-MacBook-Air:20170417 g-2019$ g++ -Wall 10011.cpp
install-no-MacBook-Air:20170417 g-2019$ fg
emacs 10011.cpp

[5]+  Stopped                 emacs 10011.cpp
install-no-MacBook-Air:20170417 g-2019$ fg
emacs 10011.cpp

[5]+  Stopped                 emacs 10011.cpp
install-no-MacBook-Air:20170417 g-2019$ g++ -Wall 10011.cpp
install-no-MacBook-Air:20170417 g-2019$ fg
emacs 10011.cpp

[5]+  Stopped                 emacs 10011.cpp
install-no-MacBook-Air:20170417 g-2019$ g++ -Wall 10011.cpp
install-no-MacBook-Air:20170417 g-2019$ fg
emacs 10011.cpp

[5]+  Stopped                 emacs 10011.cpp
install-no-MacBook-Air:20170417 g-2019$ g++ -Wall 10011.cpp
install-no-MacBook-Air:20170417 g-2019$ fg
emacs 10011.cpp

#include <iostream>

using namespace std ;

int main (){

  int  n ;

  cin >> n;

  int i = 1 ;

  int a[n];

  for (i = 1 ; n >= i ; i++){
    cin >> a[i];
      }

  for (i = n ; i > 1 ; i--){
    cout<< a[i] << " ";

  }
  cout <<" " <<  a[i] << endl;
}

Compiler output:
a.cc:2:54: error: stray '@' in program
    2 | install-no-MacBook-Air:~ g-2019$ rsync -auvz  install@192.168.1.40:Downloads/Symantec_Endpoint_Protection_12.1.6_MP6_Mac_Client_JP  ~/Downloads/
      |                                                      ^
a.cc:2:55: error: too many decimal points in number
    2 | install-no-MacBook-Air:~ g-2019$ rsync -auvz  install@192.168.1.40:Downloads/Symantec_Endpoint_Protection_12.1.6_MP6_Mac_Client_JP  ~/Downloads/
      |                                                       ^~~~~~~~~~~~
a.cc:2:109: error: too many decimal points in number
    2 | install-no-MacBook-Air:~ g-2019$ rsync -auvz  install@192.168.1.40:Downloads/Symantec_Endpoint_Protection_12.1.6_MP6_Mac_Client_JP  ~/Downloads/
      |                                                                                                             ^~~~~~~~~~~~~~~~~~~~~~
a.cc:4:12: error: stray '\' in program
    4 |   [????????\???2017/04/17 16:40:47]
      |            ^
a.cc:6:35: error: stray '\' in program
    6 | Restored session: 2017??´ 4???17??\ ????????\ 16???34???11?§? JST
      |                                   ^
a.cc:6:45: error: stray '\' in program
    6 | Restored session: 2017??´ 4???17??\ ????????\ 16???34???11?§? JST
      |                                             ^
a.cc:6:60: error: extended character § is not valid in an identifier
    6 | Restored session: 2017??´ 4???17??\ ????????\ 16???34???11?§? JST
      |                                                            ^
a.cc:62:42: warning: multi-character character constant [-Wmultichar]
   62 | clang: error: no such file or directory: 'sum'
      |                                          ^~~~~
a.cc:65:38: warning: multi-character character constant [-Wmultichar]
   65 | sum.cpp:13:9: error: no member named 'cont' in namespace 'std'
      |                                      ^~~~~~
a.cc:65:58: warning: multi-character character constant [-Wmultichar]
   65 | sum.cpp:13:9: error: no member named 'cont' in namespace 'std'
      |                                                          ^~~~~
a.cc:74:38: warning: multi-character character constant [-Wmultichar]
   74 | sum.cpp:13:9: error: no member named 'cont' in namespace 'std'; did you mean
      |                                      ^~~~~~
a.cc:74:58: warning: multi-character character constant [-Wmultichar]
   74 | sum.cpp:13:9: error: no member named 'cont' in namespace 'std'; did you mean
      |                                                          ^~~~~
a.cc:75:7: warning: multi-character character constant [-Wmultichar]
   75 |       'cout'?
      |       ^~~~~~
a.cc:80:7: warning: multi-character character constant [-Wmultichar]
   80 |       'cout' declared here
      |       ^~~~~~
a.cc:134:23: warning: multi-character character constant [-Wmultichar]
  134 | sum.cpp:15:20: error: 'sum' is not a class, namespace, or enumeration
      |                       ^~~~~
a.cc:137:20: warning: multi-character character constant [-Wmultichar]
  137 | sum.cpp:9:7: note: 'sum' declared here
      |                    ^~~~~
a.cc:142:42: warning: multi-character literal with 9 characters exceeds 'int' size of 4 bytes
  142 | clang: error: no such file or directory: 'sum.cppfg'
      |                                          ^~~~~~~~~~~
a.cc:185:64: warning: multi-character literal with 12 characters exceeds 'int' size of 4 bytes
  185 | 10006.cpp:12:25: error: invalid operands to binary expression ('const char *'
      |                                                                ^~~~~~~~~~~~~~
a.cc:186:11: warning: multi-character character constant [-Wmultichar]
  186 |       and 'int')
      |           ^~~~~
a.cc:204:7: warning: multi-character character constant [-Wmultichar]
  204 |       'main' is called [-Wsometimes-uninitialized]
      |       ^~~~~~
a.cc:225:43: error: stray '`' in program
  225 | -bash: syntax error near unexpected token `newline'
      |                                           ^
a.cc:225:51: warning: missing terminating ' character
  225 | -bash: syntax error near unexpected token `newline'
      |                                                   ^
a.cc:225:51: error: missing terminating ' character
a.cc:1:1: error: 'Last' does not name a type
    1 | Last login: Mon Apr 17 14:18:01 on ttys001
      | ^~~~
a.cc:67:4: error: expected class-name before '~' token
   67 |   ~~~~~~^
      |    ^
a.cc:74:65: error: 'did' does not name a type
   74 | sum.cpp:13:9: error: no member named 'cont' in namespace 'std'; did you mean
      |                                                                 ^~~
a.cc:77:4: error: expected class-name before '~' token
   77 |   ~~~~~~^~~~
      |    ^
a.cc:82:33: error: expected unqualified-id before '^' token
   82 |                                 ^
      |                                 ^
a.cc:136:20: error: expected unqualified-id before '^' token
  136 |                    ^
      |                    ^
a.cc:139:7: error: expected unqualified-id before '^' token
  139 |       ^
      |       ^
a.cc:183:21: error: expected unqualified-id before '^' token
  183 |                     ^
      |                     ^
a.cc:185:1: error: expected unqualified-id before numeric constant
  185 | 10006.cpp:12:25: error: invalid operands to binary expression ('const char *'
      | ^~~~~~~~~
a.cc:188:23: error: expected class-name before '~' token
  188 |                      ~~~^ ~
      |                       ^
a.cc:198:20: error: expected unqualified-id before '^' token
  198 |                    ^
      |                    ^
a.cc:201:12: error: expected unqualified-id before '^' token
  201 |            ^
      |            ^
a.cc:206:4: error: expected class-name before '~' token
  206 |   ~~~~^
      |    ^