Noc20-Cs06 Week 04 Assignment 02
Noc20-Cs06 Week 04 Assignment 02
(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)
(course)
Announcements (announcements)
Week-04 Program-01
Course Due on 2020-02-27, 23:59 IST
outline
Write a C Program to Find the Smallest Number among Three
Numbers (integer values) using Nested IF-Else statement.
How does an
NPTEL online Sample Test Cases
course work? Input Output
Week 4
The due date for submitting this assignment has passed.
Lecture 16: IF- As per our records you have not submitted this assignment.
ELSE Sample solutions (Provided by instructor)
Statement 1 #include <stdio.h>
(Contd.) (unit? 2 int main()
unit=5&lesson=30) 3 {
4 int n1, n2, n3;
5 scanf("%d %d %d", &n1, &n2, &n3); /* where three number are read fr
Lecture 17: 6
Switch 7 /* Complete the program to get the desired output */
statement 8 /* Only use the printf statement given below to exactly match your outp
9 with the output cases. Change the variable n1 as required.
(unit? 10
unit=5&lesson=31) 11 printf("%d is the smallest number.", n1); //Copy and paste this prin
12
Lecture 18: 13 */
Switch
14
15 if (n1<n2)
https://onlinecourses.nptel.ac.in/noc20_cs06/progassignment?name=109 1/3
03/07/2020 Problem solving through Programming In C - Course
Statement 16 {
(Contd.) and 17 if(n1<n3)
18 printf("%d is the smallest number.", n1);
Introduction to 19 else
Loops (unit? 20 printf("%d is the smallest number.", n3);
unit=5&lesson=32) 21 }
22 else
23 {
Lecture 19: 24 if(n2<n3)
Implementing 25 printf("%d is the smallest number.", n2);
Repetitions 26 else
27 printf("%d is the smallest number.", n3);
(Loops) (unit? 28 }
unit=5&lesson=33) 29 }
30
Lecture 20:
Implementation
of Loops with
for Statement
(Contd.) (unit?
unit=5&lesson=34)
Quiz :
Assignment 4
(assessment?
name=103)
Week-04
Program-01
(/noc20_cs06/progassignment?
name=109)
Week-04
Program-02
(/noc20_cs06/progassignment?
name=110)
Week-04
Program-03
(/noc20_cs06/progassignment?
name=111)
Week-04
Program-04
(/noc20_cs06/progassignment?
name=112)
Week-04
Program-05
(/noc20_cs06/progassignment?
name=113)
Feedback For
Week 4 (unit?
unit=5&lesson=115)
Week 5
Week 6
Week 7
Week 8
Week 9
https://onlinecourses.nptel.ac.in/noc20_cs06/progassignment?name=109 2/3
03/07/2020 Problem solving through Programming In C - Course
Week 10
Week 11
Week 12
DOWNLOAD
VIDEOS
Assignment
Solution
https://onlinecourses.nptel.ac.in/noc20_cs06/progassignment?name=109 3/3