Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Jul 12th, 2018 52 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  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