Commit 3fe12f06 by Jürgen Hein

Upload New File

parent db5b570e
Showing with 52 additions and 0 deletions
/* Sisestada sümbolite jada S[] ja see väljastada stringina.*/
/* Sisestada sümbolite jada S[] ja see väljastada stringina.*/
#include <stdio.h>//_________________________________3__
void sisse(char[],int,char[]);//_____________________6__
int mitu(char[]);//__________________________________4__
void valja(char[]);//________________________________7__
int main(void)//_____________________________________1__
{ //_____________________________________1__
int N;//_________________________________________2__
N=mitu("Sisestage stringi pikkus");//________3__
char S[N];//_______________________________________5__
sisse("Sisestage S ",N,S);//___________________________6__
valja(S);//________________________________________7__
return 0;//________________________________________1__
}//____________________________________________________1__
void valja(char cc[])//_______________________________8__
{
printf(" Sisestatud string %s", cc );
printf("\n ");
}
void sisse(char se[],int nn,char ss[])//_______________8__
{
int t=0;;
do
{
printf(" %s [%d]\n",se,t,ss);
scanf("%s", &ss[t]);
t++;
}while(t<nn-1);
}
int mitu(char sel[])//________________________________8__
{ int nn;
do
{
printf("%s\n", sel);
scanf("%d", &nn);
if(nn<0)
printf("peab olema > 0 ");
}while(nn<=0);
return nn;
}
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