Change Alg
This commit is contained in:
parent
08ef9070a4
commit
09395276e0
5 changed files with 402 additions and 20 deletions
19
2025.04.04/14Ex/code.c
Normal file
19
2025.04.04/14Ex/code.c
Normal file
|
@ -0,0 +1,19 @@
|
|||
#include <stdio.h>
|
||||
|
||||
int main (void)
|
||||
{
|
||||
int num = 0;
|
||||
char digit = 0;
|
||||
printf("Enter your digit:\n");
|
||||
if (!canf("%c", &digit))
|
||||
{
|
||||
printf("WRONG FORMAT!\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
num = digit - '0'
|
||||
printf("Your digit is: %d\n" num);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue