Commit 47231ee5 by krkris

Esimene

parent 6020211e
Showing with 39 additions and 0 deletions
#include <stdio.h>
#include <string.h>
int main(void){
char a[20], b[20], c[20], d[20];
printf("Sisestage 4x4 Karnaugh kaart või 16 loogikaväärtust: \n");
scanf("%s", a);
if(strlen(a) == 4){
printf("Sisestage teine rida \n");
scanf("%s", b);
if (strlen(b) != 4){
printf("Vale!");
return 0;
}
printf("Sisestage kolmas rida \n");
scanf("%s", c);
if (strlen(c) != 4){
printf("Vale!");
return 0;
}
printf("Sisestage neljas rida \n");
scanf("%s", d);
if (strlen(d) != 4){
printf("Vale!");
return 0;
}
}
else{
printf("Vale!");
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment