daily pastebin goal
50%
SHARE
TWEET

Untitled

a guest Jul 12th, 2018 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4.  
  5.  
  6. int main(int argc, char *argv[]){
  7.     int i;
  8.     int nb;
  9.     float som=0;
  10.     printf("Veuillez entrer le nombre de termes\n");
  11.     scanf("%d",&nb);
  12.     for(i=1;i<=nb;i++){
  13.         som+=1.0/i;
  14.     }
  15.     printf("La somme des termes est √©gale √†: %f\n", som);
  16.     return 0;
  17. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top