Facebook
From Karl, 7 Years ago, written in C++.
">

A PHP Error was encountered

Severity: Notice

Message: Trying to access array offset on value of type bool

Filename: view/view.php

Line Number: 33

from

A PHP Error was encountered

Severity: Notice

Message: Trying to access array offset on value of type bool

Filename: view/view.php

Line Number: 33

- view diff
Embed
Download Paste or View Raw
Hits: 417
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int n;
  8.     double suma=0;
  9.     cout << "Podaj ile skladnikow chcesz dodac :";
  10.     cin>>n;
  11.      for (int i=1;i<=n;i++)
  12.     {
  13.         suma=suma + 1/i;
  14.     }
  15.  
  16.     cout << "Suma "<<n<<" skladnikow to :"<<suma;
  17.     return 0;
  18. }
  19.