Skip to content

Commit 9927732

Browse files
authored
Update and rename 47. Is Armstrong or not.c to 00. Is Armstrong or not.c
1 parent 23b9a14 commit 9927732

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

For loop/47. Is Armstrong or not.c renamed to For loop/00. Is Armstrong or not.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// Copyright 2022 finchren
22
/*
3-
Write a C program to check whether a number is a Strong Number or not
3+
Write a C program to check whether a number is an Armstrong Number or not
44
Test Data :
5-
Input a number to check whether it is Strong number: 15
5+
Input a number to check whether it is an Armstrong number: 15
66
Expected Output :
7-
15 is not a Strong number.
7+
15 is not an Armstrong number.
88
99
+ 1. Take input
1010
+ 2. Invalid input
@@ -69,9 +69,9 @@ void test(int number, int expected, int test_number) {
6969

7070
void print_is_armstrong(int number, int is_armstrong) {
7171
if (is_armstrong) {
72-
printf("%d is a Strong number.\n", number);
72+
printf("%d is an Armstrong number.\n", number);
7373
} else {
74-
printf("%d is not a Strong number.\n", number);
74+
printf("%d is not an Armstrong number.\n", number);
7575
}
7676
}
7777

@@ -115,7 +115,7 @@ void print_invalid_input() {
115115
int input_number() {
116116
int number;
117117
char endline;
118-
printf("Input a number to check whether it is Strong number:\n");
118+
printf("Input a number to check whether it is an Armstrong number:\n");
119119
if (!scanf("%d%c", &number, &endline) || endline != '\n') {
120120
number = -1;
121121
}

0 commit comments

Comments
 (0)