24 lines
399 B
C
24 lines
399 B
C
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <assert.h>
|
|
#define LINE_SIZE 10
|
|
int main(){
|
|
char riadok[LINE_SIZE];
|
|
memset(riadok, 0,LINE_SIZE);
|
|
char* r = fgets(riadok,LINE_SIZE,stdin);
|
|
assert(r!=NULL);
|
|
int r2 = atol(riadok);
|
|
int stop = 0;
|
|
if (r2 == 0){
|
|
printf("Konverzia sa nepodarila alebo v reťazci sa nachádza nula.");
|
|
stop++;
|
|
}
|
|
if(stop == 0){
|
|
printf("%d", r2);
|
|
|
|
}
|
|
|
|
|
|
}
|