2023-12-18 14:54:52 +01:00
|
|
|
//
|
|
|
|
// Created by bruno on 12/11/23.
|
|
|
|
//
|
|
|
|
|
|
|
|
#include "do_while_znak.h"
|
|
|
|
#include "stdio.h"
|
|
|
|
|
|
|
|
|
2024-01-22 14:41:15 +01:00
|
|
|
int do_while_znak() {
|
2023-12-18 14:54:52 +01:00
|
|
|
int c;
|
|
|
|
int pocet = 0;
|
|
|
|
const int koniec = 'k';
|
|
|
|
|
|
|
|
do {
|
|
|
|
c = getchar();
|
|
|
|
putchar(c);
|
|
|
|
pocet++;
|
|
|
|
} while (c != koniec);
|
|
|
|
printf("\nVydržal si %d znakov pred tým, ako si napísal %c (vrátane) .\n", pocet, koniec);
|
|
|
|
return 0;
|
|
|
|
}
|