repitiations

Run Settings
LanguageC
Language Version
Run Command
#include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> #include <ctype.h> int main() { int i,n=1,arr[10] = {0,0,0,0,0,0,0,0,0,0}; char c; for (i = 0; i<n; i++) { scanf("%c",&c); // if (isdigit(c)) { // printf("%c",c); switch (c) { case '0': arr[0]++; break; case '1': arr[1]++; break; case '2': arr[2]++; break; case '3': arr[3]++; break; case '4': arr[4]++; break; case '5': arr[5]++; break; case '6': arr[6]++; break; case '7': arr[7]++; break; case '8': arr[8]++; break; case '9': arr[9]++; break; } // } printf("%c",c); if (c == '\n') { break; } n++; } for (i = 0; i<10; i++) { printf("%d ",arr[i]); } return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines