c++ - Why i don't have a correct answer for ro? -


#include<stdio.h> #include <math.h>  int main() {     float pb;     float n;     float ro;     float nb;      printf(" find number of charges , users \n \n \n ");      printf(" please enter probability \n ");      printf(" probability ");      scanf("%f",&pb);       printf("\n \n please enter number of circuits n \n");      printf("the number is");      scanf("%f",&n);      while ( pb>0.01 )     {         pb=1/(1+n/(ro*pb));         ro=ro+0.01;     }      printf("%f",ro); } 

you need to, @ least, initialize variables don't read user. right now, doing math using "random" value.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -