bouchnina

Dépassement

Nov 28th, 2014
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.29 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <math.h>
  3. void main(){
  4.     int N , i;
  5.     printf("Entrez un nombre N : ");
  6.     scanf("%d",&N);
  7.     for(i=1;i<10000;i++){
  8.         if(pow(2,i)>N){
  9.             printf("\nLa puissance de 2 qui depasse %d est %d est le resultat c est %d.\n",N,i,pow(2,i));
  10.             break;
  11.         }
  12.     }
  13. system("pause");
  14. }
Advertisement
Add Comment
Please, Sign In to add comment