Problem Solving Through Programming In C
Subscribe to our YouTube Channel : Swayam Solver
Please scroll down for latest Programs. 👇
Week-03: Programing Assignment-01
Due on 2023-02-16, 23:59 ISTWrite a C Program to calculates the area (floating point number with two decimal places) of a Circle given it’s radius (integer value). The value of Pi is 3.14.
[Marks for Week 3 Programming assignments will not be evaluated finally. This is for users to get familiar with programming in google course builder platform]
Public Test Cases Input Expected Output Actual Output Status Test Case 1 7
Area of a circle = 153.86\n
Area of a circle = 153.86\n
Passed
Test Case 2 50
Area of a circle = 7850.00\n
Area of a circle = 7850.00\n
Passed
Write a C Program to calculates the area (floating point number with two decimal places) of a Circle given it’s radius (integer value). The value of Pi is 3.14.
[Marks for Week 3 Programming assignments will not be evaluated finally. This is for users to get familiar with programming in google course builder platform]
[Marks for Week 3 Programming assignments will not be evaluated finally. This is for users to get familiar with programming in google course builder platform]
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 7 | Area of a circle = 153.86\n
| Area of a circle = 153.86\n
| Passed |
Test Case 2 | 50 | Area of a circle = 7850.00\n
| Area of a circle = 7850.00\n
| Passed |
Private Test cases used for Evaluation | Status |
Test Case 1 | Passed |
Week-03: Program-02
Due on 2022-08-18, 23:59 IST
Write a C program to check if a given Number is zero or Positive or Negative Using if...else statement.
[Week 3 programming assignments will not be considered for final evaluation]
[Week 3 programming assignments will not be considered for final evaluation]
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 14.05 | Positive number. | Positive number. | Passed |
Test Case 2 | 0.45 | Positive number. | Positive number. | Passed |
Test Case 3 | -0.9 | Negative number. | Negative number. | Passed |
Private Test cases used for Evaluation | Status |
Test Case 1 | Passed |
Test Case 2 | Passed |
Week-03: Program-03
Due on 2022-08-18, 23:59 IST
Write a C program to check whether a given number (integer) is Even or Odd.
[This program does not carry any marks.]
[This program does not carry any marks.]
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 116 | 116 is even. | 116 is even. | Passed |
Test Case 2 | 51 | 51 is odd. | 51 is odd. | Passed |
Private Test cases used for Evaluation | Status |
Test Case 1 | Passed |
Test Case 2 | Passed |
Week-03 Program-04
Due on 2022-08-18, 23:59 IST
Write a C Program to find the Largest Number (integer) among Three Numbers (integers) using IF and Logical && operator.
[Week 3 programming assignments will not be considered for final evaluation]
[Week 3 programming assignments will not be considered for final evaluation]
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 45 34 67 | 67 is the largest number. | 67 is the largest number. | Passed |
Test Case 2 | -9 -4 -20 | -4 is the largest number. | -4 is the largest number. | Passed |
Private Test cases used for Evaluation | Status |
Test Case 1 | Passed |
------------------------------------------------------------------------------------------------------------
Week-04: Programing Assignment-01
Due on 2023-02-23, 23:59 IST
Write a C Program to Find the Smallest Number among Three Numbers (integer values) using Nested IF-Else statement.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 20 30 10 | 10 is the smallest number. | 10 is the smallest number. | Passed |
Test Case 2 | 77 44 99 | 44 is the smallest number. | 44 is the smallest number. | Passed |
Private Test cases used for Evaluation | Status |
Test Case 1 | Passed |
Test Case 2 | Passed |
Week-04: Programing Assignment-02
Due on 2023-02-23, 23:59 IST
Write a program to find the factorial of a given number using while loop.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 5 | The Factorial of 5 is : 120 | The Factorial of 5 is : 120 | Passed |
Test Case 2 | 7 | The Factorial of 7 is : 5040 | The Factorial of 7 is : 5040 | Passed |
Private Test cases used for Evaluation | Status |
Test Case 1 | Passed |
Week-04: Programing Assignment-03
Due on 2023-02-23, 23:59 IST
Write a Program to find the sum of all even numbers from 1 to N where the value of N is taken as input. [For example when N is 10 then the sum is 2+4+6+8+10 = 30]
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 10 | Sum = 30 | Sum = 30 | Passed |
Test Case 2 | 25 | Sum = 156 | Sum = 156 | Passed |
Private Test cases used for Evaluation | Status |
Test Case 1 | Passed |
Test Case 2 | Passed |
Week-04: Programing Assignment-04
Due on 2023-02-23, 23:59 IST
Write a C program to calculate the Sum of First and the Last Digit of a given Number. For example if the number is 1234 the result is 1+4 = 5.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 2908 | Sum of First and Last digit = 10 | Sum of First and Last digit = 10 | Passed |
Test Case 2 | 56986 | Sum of First and Last digit = 11 | Sum of First and Last digit = 11 | Passed |
Private Test cases used for Evaluation | Status |
Test Case 1 | Passed |
Test Case 2 | Passed |
No comments:
Post a Comment
Keep your comments reader friendly. Be civil and respectful. No self-promotion or spam. Stick to the topic. Questions welcome.