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

Noc20-Cs06 Week 03 Assignment 04

This document is from an online NPTEL course on problem solving through programming in C. It provides instructions for assignment 3, week 3 program 3, which asks students to write a C program to check if a given number is even or odd. It gives 4 sample test cases with inputs and expected outputs and provides a sample solution code that takes in a number, uses the modulo operator to check if it is evenly divisible by 2, and prints the corresponding output. The due date for this assignment has passed and as per records, the student has not submitted it.

Uploaded by

sdf
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)
81 views3 pages

Noc20-Cs06 Week 03 Assignment 04

This document is from an online NPTEL course on problem solving through programming in C. It provides instructions for assignment 3, week 3 program 3, which asks students to write a C program to check if a given number is even or odd. It gives 4 sample test cases with inputs and expected outputs and provides a sample solution code that takes in a number, uses the modulo operator to check if it is evenly divisible by 2, and prints the corresponding output. The due date for this assignment has passed and as per records, the student has not submitted it.

Uploaded by

sdf
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-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

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