Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
glkink
/
C-programming
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
5a782711
authored
Jan 23, 2022
by
glkink
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new file
parent
16e87b13
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
0 deletions
KTvariantCül2
KTvariantCül2
0 → 100644
View file @
5a782711
#include <stdio.h>
#include <stdio.h>
#include <string.h>
int suurvaike(char s[], char ch, int kord) {
int c = 0;
int muudatus=0;
int i;
kord=strlen(s);
for(i=0;i<kord;i++){
while (s[c] != '\0') {
ch = s[c];
if (ch >= 'A' && ch <= 'Z')
s[c] = s[c] + 32;
else if (ch >= 'a' && ch <= 'z')
s[c] = s[c] - 32;
c++;
}
}
kord--;
i--;
return muudatus;
}
int main()
{
char string[100];
char ch=0;
int muudatus=0;
printf("Sisesta tahed:\n");
gets(string);
suurvaike(string, ch, muudatus);
printf("Tahed: %s\n", string);
printf("Muudatuste arv: %d\n", muudatus);
return 0;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment