Sunday, 13 August 2017

Genric root of a number in single line statement in C

#include"stdio.h"
main()
{
int n;
printf("Enter a number");
scanf("%d",&n);
n%9==0?printf("9"):printf("%d",n%9);
}

No comments:

Post a Comment