Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jun 26, 2022. It is now read-only.

Commit392b0c8

Browse files
Merge pull request#230 from Agung-Krisna/Agung-Krisna
Added my name into the CONTRIBUTORS.md
2 parentsf0d18e7 +224087b commit392b0c8

File tree

3 files changed

+57
-0
lines changed

3 files changed

+57
-0
lines changed

‎CONTRIBUTORS.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ If you have contributed to this repository, kindly add your username here
2626
-[HarshitGupta150](https://github.com/HarshitGupta150)
2727
-[qwertymaden](https://github.com/qwertymaden)
2828
-[mjnorton](https://github.com/mjnorton)
29+
-[Agung-Krisna](https://github.com/Agung-Krisna)
2930
-[rawho](https://github.com/rawho)
3031
-[not-Aishik](https://github.com/not-Aishik)
3132
-[BrijeshKumar](https://github.com/brijeshsos66)

‎c/Agung-Krisna_Anagram.c‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#include<stdio.h>
2+
#include<stdlib.h>
3+
#include<string.h>
4+
5+
//Agung-Krisna, 2020
6+
intmain(){
7+
charfirst[500];
8+
charsecond[500];
9+
intw1;
10+
intw2;
11+
printf ("Enter the first word here\n");//Prompting the user to input a string.
12+
scanf ("%s",first);
13+
14+
printf ("Enter the second word here\n");//Prompting the user to input another string to check.
15+
scanf ("%s",second);
16+
17+
w1=strlen (first);
18+
w2=strlen (second);
19+
20+
if (w1!=w2){//checking inequalities.
21+
printf ("%s and %s is not an Anagram",first,second);
22+
}
23+
else {//string is equal.
24+
printf ("%s and %s is an Anagram",first,second);
25+
}
26+
}

‎c/PalindromeAlg.c‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#include<stdio.h>
2+
#include<stdlib.h>
3+
#include<math.h>
4+
#include<string.h>
5+
6+
7+
8+
intmain (){
9+
charwords[200];
10+
printf ("Enter the word that needs to be checked:\n");//Asking the user to input the value.
11+
scanf ("%s",words);
12+
13+
intl=0;//Defining the lower index.
14+
intr=strlen(words)-1;//Defining the higher index.
15+
16+
charpalindrome[50];
17+
printf ("%s",words);
18+
19+
//Comparing the value until the condition is met.
20+
while (r>l){
21+
if (words[l++]!=words[r--]){//Lower and higher index does not match.
22+
strcpy (palindrome," is not a Palindrome");
23+
}
24+
else {//Lower and higher index matched.
25+
strcpy (palindrome," is a Palindrome");
26+
}
27+
}
28+
printf ("%s",palindrome);//Printing the results.
29+
return0;
30+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp