Message from C, C++ talks

June 2019

— Read my message again

— NANIIIIIIIIIIIIIIiii

— Hey guy's

— Need assistance here

— 

#include<stdio.h>
//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");
scanf("%d,%d,f",&p,&n,&r);
si=(p*n*r)/100;
printf("simple interest=%f",si);
count++;
}
}

— 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