fork(1) download
  1. #include<iostream>
  2. #include<iomanip>
  3. int main(){
  4. int Y,Q,T,i=0;
  5. double float e,f,g;
  6. cin>>T;
  7. while (cin>>Y>>Q>>e>>f>>g,i++,i<=4){
  8. cout<<setiosflags(ios::fixed)<<setprecision(1)<<Y*(1+e*100/365)*(1+g)<<endl;
  9. cout<<setiosflags(ios::fixed)<<setprecision(1)<<Y*1+f*(Q+365)/365)<<endl;
  10. }
  11. return 0;
  12. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
4 
10000 100 2.3 3.7 3.9
10000 100 1.7 3.7 3.9
10000 200 1.7 3.7 3.9
10000 300 1.7 3.7 3.9
compilation info
prog.cpp:9:5: error: stray ‘\357’ in program
     cout<<setiosflags(ios::fixed)<<setprecision(1)<<Y*(1+f*(Q+365)/365)<<endl;
     ^
prog.cpp:9:5: error: stray ‘\274’ in program
prog.cpp:9:5: error: stray ‘\210’ in program
prog.cpp: In function ‘int main()’:
prog.cpp:5:16: error: two or more data types in declaration of ‘e’
   double float e,f,g;
                ^
prog.cpp:5:18: error: two or more data types in declaration of ‘f’
   double float e,f,g;
                  ^
prog.cpp:5:20: error: two or more data types in declaration of ‘g’
   double float e,f,g;
                    ^
prog.cpp:6:3: error: ‘cin’ was not declared in this scope
   cin>>T;
   ^
prog.cpp:6:3: note: suggested alternative:
In file included from prog.cpp:1:0:
/usr/include/c++/4.8/iostream:60:18: note:   ‘std::cin’
   extern istream cin;  /// Linked to standard input
                  ^
prog.cpp:7:21: error: ‘e’ was not declared in this scope
   while (cin>>Y>>Q>>e>>f>>g,i++,i<=4){
                     ^
prog.cpp:7:24: error: ‘f’ was not declared in this scope
   while (cin>>Y>>Q>>e>>f>>g,i++,i<=4){
                        ^
prog.cpp:7:27: error: ‘g’ was not declared in this scope
   while (cin>>Y>>Q>>e>>f>>g,i++,i<=4){
                           ^
prog.cpp:8:5: error: ‘cout’ was not declared in this scope
     cout<<setiosflags(ios::fixed)<<setprecision(1)<<Y*(1+e*100/365)*(1+g)<<endl;
     ^
prog.cpp:8:5: note: suggested alternative:
In file included from prog.cpp:1:0:
/usr/include/c++/4.8/iostream:61:18: note:   ‘std::cout’
   extern ostream cout;  /// Linked to standard output
                  ^
prog.cpp:8:23: error: ‘ios’ has not been declared
     cout<<setiosflags(ios::fixed)<<setprecision(1)<<Y*(1+e*100/365)*(1+g)<<endl;
                       ^
prog.cpp:8:33: error: ‘setiosflags’ was not declared in this scope
     cout<<setiosflags(ios::fixed)<<setprecision(1)<<Y*(1+e*100/365)*(1+g)<<endl;
                                 ^
prog.cpp:8:33: note: suggested alternative:
In file included from prog.cpp:2:0:
/usr/include/c++/4.8/iomanip:93:3: note:   ‘std::setiosflags’
   setiosflags(ios_base::fmtflags __mask)
   ^
prog.cpp:8:50: error: ‘setprecision’ was not declared in this scope
     cout<<setiosflags(ios::fixed)<<setprecision(1)<<Y*(1+e*100/365)*(1+g)<<endl;
                                                  ^
prog.cpp:8:50: note: suggested alternative:
In file included from prog.cpp:2:0:
/usr/include/c++/4.8/iomanip:192:3: note:   ‘std::setprecision’
   setprecision(int __n)
   ^
prog.cpp:8:76: error: ‘endl’ was not declared in this scope
     cout<<setiosflags(ios::fixed)<<setprecision(1)<<Y*(1+e*100/365)*(1+g)<<endl;
                                                                            ^
prog.cpp:8:76: note: suggested alternative:
In file included from /usr/include/c++/4.8/iostream:39:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/ostream:564:5: note:   ‘std::endl’
     endl(basic_ostream<_CharT, _Traits>& __os)
     ^
prog.cpp:9:23: error: ‘ios’ has not been declared
     cout<<setiosflags(ios::fixed)<<setprecision(1)<<Y*(1+f*(Q+365)/365)<<endl;
                       ^
prog.cpp:9:73: error: expected ‘;’ before ‘)’ token
     cout<<setiosflags(ios::fixed)<<setprecision(1)<<Y*(1+f*(Q+365)/365)<<endl;
                                                                         ^
stdout
Standard output is empty