0% found this document useful (0 votes)
66 views3 pages

Noc20-Cs06 Week 04 Assignment 02

This document provides information about Week 4 of an online C programming course through NPTEL. It includes instructions for an assignment to write a program to find the smallest number among three input integers using nested if-else statements. Sample test cases and a sample solution are provided. The due date for the assignment has passed according to the records.

Uploaded by

Modicare Quite
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views3 pages

Noc20-Cs06 Week 04 Assignment 02

This document provides information about Week 4 of an online C programming course through NPTEL. It includes instructions for an assignment to write a program to find the smallest number among three input integers using nested if-else statements. Sample test cases and a sample solution are provided. The due date for the assignment has passed according to the records.

Uploaded by

Modicare Quite
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
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)

reviewer4@nptel.iitm.ac.in 

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-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 0 Test Case 1 90 -19 -28 -28 is the smallest number.

Week 1 Test Case 2 40 30 60 30 is the smallest number.

Week 2 Test Case 3 45 70 10 10 is the smallest number.

Week 3 Test Case 4 60 120 190 60 is the smallest number.

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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy