Message from C, C++ talks

June 2019

— Read my message again


— Hey guy's

— Need assistance here


//program to calculate simple into 3sets of p,n ajd r where p=principle, n=no of years,rate of interest
void main()
int p,n, count=1;
float r,si;
while (count<=3)
printf("enter the value of p,n & r\n\n");
printf("simple interest=%f",si);

— Am getting 1.### as my output

— Mb u lost % in scanf before f ?

— I added and nothing changed

— If ur answer in float, why p and n int ?

— And main always must be int

— Msvc allows this for several versions actually

— Did you recompile you code? :)

— I know, but it's not the right way for code)

— Is that right ?

— Yeah