Home

Learn Programming & Prepare for NPTEL Exams... Swayam Solver is your one-stop destination for NPTEL exam preparation.

NPTEL Problem Solving Through Programming In C - Programming Assignment | July-2026



  Please scroll down for latest Programs   👇 


Problem Solving through Programming in C

NPTEL



Week-03: Practice Program-01

Your last recorded submission was on 2026-08-10, 17:10 IST.

Q. 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

Due date on 2026-08-13, 23:59 IST

Select the Language for this assignment.

C


#include <stdio.h>
int main()
{
    double number;
    scanf("%lf", &number);

    if (number == 0) {
        printf("The number is 0.");
    } else if (number < 0) {
        printf("Negative number.");
    } else {
        printf("Positive number.");
    }

    return 0;
}



Week-03: Practice Program-02

Your last recorded submission was on 2026-08-10, 18:52 IST.

Q. 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]

Due date on 2026-08-13, 23:59 IST

Select the Language for this assignment.


Code Snippet to Paste in the Editor

If the template already includes the header and initial lines, add the following code after scanf("%lf", &number);:




Week-03: Practice Program-02

Due date on 2026-08-13, 23:59 IST

Your last recorded submission was on 2026-08-11, 11:37 IST.

Q.

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]

Sample Test Cases

Test Case
Input
Output
Test Case 1

14.05

Test Case 2

0.45

Test Case 3

-50




















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.