Advertisement
idsystems

CPP_Practica52_Serie1

Mar 13th, 2013
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.26 KB | None | 0 0
  1. // Program: serie1.cc
  2. // Author:  Yoan Pinzon
  3. // Date:    Agosto 30, 2006
  4.  
  5. #include <iostream>
  6.  
  7. using namespace std;
  8.  
  9. int main(){
  10.    float suma=0.0;
  11.  
  12.    for(int i=1; i<=50; i++) suma+=1.0/i;
  13.    cout << "suma= " << suma << endl;
  14.    
  15.    return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement