calcv2
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// 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;
|
||||
}
|
||||
Reference in New Issue
Block a user