Initial Basics – Geometry – Problem #3

IIT Kharagpur CS10001 / CS11001 Programming and Data Structures Lab Question Archive

Difficulty: hard

Problem Statement

1. Write a C program which takes as input the coordinates of the vertices of a triangle and does the following : a. Print the area of the triangle b. Print whether the triangle is acute, obtuse or right angle c. Check whether the triangle is equilateral or isosceles and if so print the type 2. Write a C program to assign the students to breakout rooms based on their roll numbers. Read n Roll nos and print the assignment of each them to rooms. Use switch statement. a. If the student roll no ends in 0 or 1, assign the student to ERoom b. If the student roll no ends in 2 or 3, assign the student to Droom c. If the student roll no ends in 4 or 5, assign the student to TRoom d. If the student roll no ends in 6 or 7, assign the student to Croom e. If the student roll no ends in 8 or 9, assign the student to PRoom.

Back to Lab Problems
Initial Basics/Geometry/Problem #3

Lab Problem Statement

Specifications & Problem DetailsIIT Kharagpur PDS Archive
Loading question...

Interactive C Compiler · Problem #3

WASM In-Browser

Runs directly on your machine · Zero remote server dependency

Compiler downloads on first Run (large, saved in your browser after that)
main.cCtrl + Enter to run
1
2
3
4
5
6
7
Input (stdin)given to scanf / cin
Output

Output appears here. Press Run to compile and execute.