Answers for "c print type of number"

2

print digits of a number in c

#include <stdio.h>

int main(){
    int num = 1024;

    while(num != 0){
        int digit = num % 10;
        num = num / 10;
        printf("%dn", digit);
    }
  
    return 0;
}
Posted by: Guest on July-08-2020
0

how to know a type of a numbe in c

int num;
char term;
if(scanf("%d%c", &num, &term) != 2 || term != 'n')
    printf("failuren");
else
    printf("valid integer followed by enter keyn");
Posted by: Guest on April-02-2021

Code answers related to "TypeScript"

Browse Popular Code Answers by Language