getchar() - probably i don't know that we can get char using this function also you can use this to capture newline character
char sample;
sample=getchar();
using scanf statement to get input in different way
input: 12-02-2017
scanf("%d-%d-%d",&day,&month,&year);
you can round digit using normal decimal notation
float a=109.7589;
printf("%.2f",a);
o/p:
109.76 // the last number is increamented by one
printing the " using printf using
printf(" \" ");
char sample;
sample=getchar();
using scanf statement to get input in different way
input: 12-02-2017
scanf("%d-%d-%d",&day,&month,&year);
you can round digit using normal decimal notation
float a=109.7589;
printf("%.2f",a);
o/p:
109.76 // the last number is increamented by one
printing the " using printf using
printf(" \" ");
Comments
Post a Comment