Introduction To Programming In C NPTEL Assignment 1 Answers

Introduction To Programming In C NPTEL Assignment 1 Answers 2022:- All the Answers provided here to help the students as a reference, You must submit your assignment at your own knowledge.

What is Introduction To Programming In C?

This is a course in programming in C. No prior programming experience is assumed; however, mathematical maturity at the level of a second-year science or engineering undergraduate is assumed. We emphasize solving problems using the language and introduce standard programming techniques like alternation, iteration, and recursion. We will briefly glimpse the basics of software engineering practices like modularization, commenting, and naming conventions which help in collaborating and programming in teams. 

CRITERIA TO GET A CERTIFICATE

Average assignment score = 25% of the average of best 6 assignments out of the total 8 assignments given in the course.
Exam score = 75% of the proctored certification exam score out of 100

Final score = Average assignment score + Exam score

YOU WILL BE ELIGIBLE FOR A CERTIFICATE ONLY IF THE AVERAGE ASSIGNMENT SCORE >=10/25 AND EXAM SCORE >= 30/75. If one of the 2 criteria is not met, you will not get the certificate even if the Final score >= 40/100.

Assignment No.Answers
Introduction To Programming In C Assignment 1Click Here
Introduction To Programming In C Assignment 2Click Here
Introduction To Programming In C Assignment 3Click Here
Introduction To Programming In C Assignment 4Click Here
Introduction To Programming In C Assignment 5Click Here
Introduction To Programming In C Assignment 6Click Here
Introduction To Programming In C Assignment 7Click Here
Introduction To Programming In C Assignment 8Click Here

Introduction To Programming In C NPTEL Assignment 1 Answers:-

Q1. You will be given 3 integers as input. The inputs may or may not be
 different from each other. 

You have to output 1 if sum of first two inputs is greater than the third input, 
and 0 otherwise

Input
————————————-
Three integers separated by space.

Output
———————————-
1 if sum of first two inputs is greater than third input
0 otherwise

Code:-

#include<stdio.h>
int main()
{
	int a,b,c;
	scanf("%d%d%d",&a,&b,&c);

if((a+b)>c)
{
printf("1");
}
else{

printf("0");

}

}

Q2. You are given two integers, say M and N.You have to output 1, if remainder is 1 when N divides M otherwise output 0

Input
—————————-
Two integers, say M and N.
Output
—————————————————You have to output 1 if remainder is 1 when M/N.You have to output 0 , otherwise.

Code:-

#include<stdio.h>
int main()
{
int m,n;
scanf("%d",&m);
scanf("%d",&n);
  if(m%n==0)
{
printf("0");
}
else
{
printf("1");
}
return 0;

}

Q3. Input : Triplet of three numbers (a,b,c)
Output : 1 if they are either in strictly increasing (a>b>c) or decreasing (a<b<c) order
0, otherwise.

Code:-

#include<stdio.h>

int main(){

int a,b,c;

scanf("%d %d %d",&a, &b, &c);

if(a>b && b>c){
    printf("1");
}
else{
    printf("0");
}

return 0;

}

Disclaimer:- We do not claim 100% surety of solutions, these solutions are based on our sole expertise, and by using posting these answers we are simply looking to help students as a reference, so we urge do your assignment on your own.

For More NPTEL Answers:- CLICK HERE

Join Our Telegram:- CLICK HERE

Introduction To Programming In C NPTEL Assignment 1 Answers 2022:- All the Answers provided here to help the students as a reference, You must submit your assignment at your own knowledge.

2 thoughts on “Introduction To Programming In C NPTEL Assignment 1 Answers”

Leave a Comment