#include<stdio.h>
int main ()
{ int x;
char s[80];
double y;
printf("ENTER\n");
scanf("%d%lf",&x,&y);
sprintf(s,"integer:%6d\ndouble:%.2f\n",x,y);
puts(s);
}
Have a Read!
Hi Everyone.
The idea for this page is to provide new c users simple c tutorials to learn how to develop the logic and more importantly correct way to write syntax.
ENJOY !!!
Sunday, February 6, 2011
How to use sprintf
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment