fork(1) download
  1. #include<stdio.h>
  2.  
  3. int main(){
  4. int tablica[11];
  5. int mnozniki[]={1,3,7,9,1,3,7,9,1,3,1};
  6. int suma =0;
  7. for(int i=0;i<11;++i){
  8. scanf("%i",&tablica[i]);
  9. tablica[i]*=mnozniki[i];
  10. suma+=tablica[i];
  11. }
  12. if(suma%10)printf("Nieprawidłowy");
  13. else printf("Ok");
  14. return 0;
  15. }
Success #stdin #stdout 0s 2116KB
stdin
1 2 3 4 5 6 7 8 9 0 11
stdout
Nieprawidłowy