-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path-index
More file actions
47 lines (42 loc) · 1.17 KB
/
-index
File metadata and controls
47 lines (42 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Index of source files and their content.
This file includes content from https://www.w3resource.com/c-programming-exercises/ and others under various licenses.
0.c
Write a C program to print the following characters in a reverse way.
Test Characters: 'X', 'M', 'L'
Expected Output:
The reverse of XML is LMX
1.c
Write a C program to convert specified days into years, weeks and days.
Note: Ignore leap year.
Test Data :
Number of days : 1329
Expected Output :
Years: 3
Weeks: 33
Days: 3
2.c
Write a C program to calculate the distance between the two points.
Test Data :
Input x1: 25
Input y1: 15
Input x2: 35
Input y2: 10
Expected Output:
Distance between the said points: 11.1803
3.c
Write a C program that read 5 numbers and counts the number of positive numbers and print the average of all positive values.
Test Data :
Input the first number: 5
Input the second number: 8
Input the third number: 10
Input the fourth number: -5
Input the fifth number: 25
Expected Output:
Number of positive numbers: 4
Average value of the said positive numbers: 12.00
4.c
Write a C program to print a number from input as Roman numerals.
Test Data:
Type in a number: 1988
Expected output:
MCMLXXXVIII