0% found this document useful (0 votes)
108 views

Noc20-Cs06 Week 03 Assignment 02

This document provides instructions for a programming assignment in C to calculate the area of a circle given its radius. Students are asked to write a program that takes in an integer radius as input and outputs the area to two decimal places, using a predefined value of 3.14 for pi. Sample test cases and a possible solution are provided. The due date for this assignment has passed and according to records, the user has not submitted it.

Uploaded by

sdf
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
108 views

Noc20-Cs06 Week 03 Assignment 02

This document provides instructions for a programming assignment in C to calculate the area of a circle given its radius. Students are asked to write a program that takes in an integer radius as input and outputs the area to two decimal places, using a predefined value of 3.14 for pi. Sample test cases and a possible solution are provided. The due date for this assignment has passed and according to records, the user has not submitted it.

Uploaded by

sdf
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

03/07/2020 Problem solving through Programming In C - Course

(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)

[email protected]

NPTEL (https://swayam.gov.in/explorer?ncCode=NPTEL) » Problem solving through Programming In C

(course)

Announcements (announcements)

About the Course (https://swayam.gov.in/nd1_noc20_cs06/preview) Ask a Question (forum)

Progress (student/home) Mentor (student/mentor)

Week-03 Program-01
Course Due on 2020-02-20, 23:59 IST
outline
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
How does an is 3.14.
NPTEL online
course work? [Marks for Week 3 Programming assignments will not be evaluated finally.
This is for users to get familiar with programming in google course
Week 0 builder platform]
Week 1 Sample Test Cases
Input Output
Week 2
Test Case 1 42 Area of a circle = 5538.96

Week 3
Test Case 2 7 Area of a circle = 153.86
Lecture 11 :
Assignment Test Case 3 50 Area of a circle = 7850.00
Statement and
Operators in C
(unit? The due date for submitting this assignment has passed.
unit=4&lesson=25) As per our records you have not submitted this assignment.
Lecture 12 : Sample solutions (Provided by instructor)
Arithmetic 1 #include <stdio.h>
Expressions 2 #define PI 3.14
3 void main()
and Relational 4 {
Expressions 5 int radius;
(unit? 6 float area;
7 /* Enter the radius of a circle */
unit=4&lesson=26) 8 scanf("%d", &radius);
9
10 area = PI * radius * radius;
11

https://onlinecourses.nptel.ac.in/noc20_cs06/progassignment?name=105 1/3
03/07/2020 Problem solving through Programming In C - Course

Lecture 13 :
12
13 printf("Area of a circle = %5.2f\n", area);
Logical 14 }
Operators and
Change in
Control Flow
(unit?
unit=4&lesson=27)

Lecture 14 :
Use of Logical
Operators in
Branching
(unit?
unit=4&lesson=28)

Lecture 15 :
Branching : IF -
ELSE
Statement
(unit?
unit=4&lesson=29)

Quiz :
Assignment 3
(assessment?
name=102)

Week-03
Program-01
(/noc20_cs06/progassignment?
name=105)

Week-03
Program-02
(/noc20_cs06/progassignment?
name=106)

Week-03
Program-03
(/noc20_cs06/progassignment?
name=107)

Week-03
Program-04
(/noc20_cs06/progassignment?
name=108)

Feedback For
Week 3 (unit?
unit=4&lesson=114)

Week 4

Week 5

Week 6

Week 7

Week 8

https://onlinecourses.nptel.ac.in/noc20_cs06/progassignment?name=105 2/3
03/07/2020 Problem solving through Programming In C - Course

Week 9

Week 10

Week 11

Week 12

DOWNLOAD
VIDEOS

Assignment
Solution

https://onlinecourses.nptel.ac.in/noc20_cs06/progassignment?name=105 3/3

You might also like