# NPTEL Introduction To Programming In C Assignment 1 Answers 2022 Are you looking for the Answers to NPTEL Introduction To Programming In C Assignment 1? This article will help you with the answer to the National Programme on Technology Enhanced Learning (NPTEL) Course “NPTEL Introduction To Programming In C Assignment 1″

## 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.

Below you can find the answers for NPTEL Introduction To Programming In C Assignment 1

## NPTEL Introduction To Programming In C 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;

}``````