21 lines
378 B
C
21 lines
378 B
C
//
|
|
// Created by bruno on 12/11/23.
|
|
//
|
|
|
|
#include "do_while_znak.h"
|
|
#include "stdio.h"
|
|
|
|
|
|
int do_while_znak(){
|
|
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;
|
|
} |