Question:C code for calculation of generic root in one line
Answer
#include <stdio.h> int main(){ int num,x; printf("Enter any number: "); scanf("%d",&num); printf("Generic root: %d",(x=num%9)?x:9); return 0; }Sample output: Enter any number: 731 Generic root: 2
+ Report
C code for calculation of generic root in one line