free c programming course
Friday, 1 February 2013
Find Generic root of number
#include <stdio.h>
int
main
()
{
int
num
,
i
;
printf
(
"Enter any number: "
);
scanf
(
"%d"
,&
num
);
printf
(
"Generic root: %d"
,
(
i
=
num
%
9
)
?
i
:
9
);
return
0
;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment