Noc20-Cs06 Week 03 Assignment 04
Noc20-Cs06 Week 03 Assignment 04
(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)
reviewer4@nptel.iitm.ac.in
(course)
Announcements (announcements)
Week-03 Program-03
Course Due on 2020-02-20, 23:59 IST
outline
Write a C program to check whether a given number (integer) is
Even or Odd.
How does an [This program does not carry any marks.]
NPTEL online
course work? Sample Test Cases
Input Output
Week 0
Test Case 1 51 51 is odd.
Week 1
Test Case 2 116 116 is even.
Week 2
Test Case 3 24 24 is even.
Week 3
Test Case 4 -25 -25 is odd.
Lecture 11 :
Assignment
Statement and The due date for submitting this assignment has passed.
Operators in C
As per our records you have not submitted this assignment.
(unit?
Sample solutions (Provided by instructor)
unit=4&lesson=25)
1 #include <stdio.h>
Lecture 12 : 2 int main()
3 {
Arithmetic 4 int number;
Expressions 5 scanf("%d", &number); /*An integer number is taken from the test ca
and Relational 6
7 /* Write the rest of the program in the box provided below. As the outp
Expressions 8 should exactly match with the output provided in the test cases so use
(unit? 9 following printf statement wherever and whichever is applicable.
unit=4&lesson=26) 10
11 printf("%d is even.", number);
12 printf("%d is odd.", number);
13
https://onlinecourses.nptel.ac.in/noc20_cs06/progassignment?name=107 1/3
03/07/2020 Problem solving through Programming In C - Course
Lecture 13 :
14 */
15
Logical 16 if(number % 2 == 0)
Operators and 17 printf("%d is even.", number);
Change in
18 else
19 printf("%d is odd.", number);
Control Flow 20 }
(unit? 21
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=107 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=107 3/3