• Tidak ada hasil yang ditemukan

Department of Information and Technology

N/A
N/A
Ken

Academic year: 2023

Membagikan "Department of Information and Technology "

Copied!
6
0
0

Teks penuh

(1)

Madhav Institute of Technology and Science

Gwalior (M.P.)

Department of Information and Technology

Submitted by: Submitted to:

Name: Shubh Gupta Dr. Sanjeev Sharma

Enrollment No.: 0901IO231065 Prof. Surbhi Gupta Branch: Internet of Things (IoT)

Semester: 1

st

(2)

Submission No.

(3)

PROGRAM 1

Objective: Write a program to add two numbers and display its sum.

Compiler: gcc (version 6.3.0)

Flowchart:

main()

Input 1st no. Input 2nd no.

Add (+)

Display the sum

(4)

using namespace std;

int main() {

double x, y;

cout << "Enter 1st no.: ";

cin >> x;

cout << "Enter 2nd no.: ";

cin >> y;

double sum = x + y;

cout << "The sum of " << x << " and " << y << " is " << sum << ".\n";

}

Output:

(5)

PROGRAM 2

Objective: Write a program to calculate and display the volume of a cylinder for height and radius parameters to be input from the user.

Compiler: gcc (6.3.0)

Flowchart:

Input height Input radius

Volume = 3.14 x radius

2

x height

Display the volume

main()

(6)

using namespace std;

int main() {

double h, r;

cout << "Enter the height of the cylinder: ";

cin >> h;

cout << "Enter the radius of the cylinder: ";

cin >> r;

double vol = 3.14 * (r*r) * h;

cout << "The volume of the given cylinder is " << vol << ".\n";

}

Output:

Referensi

Dokumen terkait

On this page there are two buttons which is delete and calculate. The delete button serves to delete the index data of SME in food that user does not want to use. The

In making this application, the author uses an Android smartphone as a tool to help display and project the Augmented Reality object of the Information Technology Study Program.. This

7 ISSN: 2345-5896 Research in Sport Management and Psychology http://www.pgsrn.net Research in Sport Management and Psychology, Volume 4, Issue 2: 7-18, 2016 The Relationship

18 | P a g e ©Daffodil International University 3.2 USE CASE DESCRIPTION 3.2.1 Input IP Address Use case Input IP address Use case no 01 Goal To enter into the webpage for

a cat b ls c mv Exercise 17 Write a C program that takes one or more file/directory names as command line input and reports the following information on the file: a File type b

1 E-ISSN 2685-709X P-ISSN 2685-905X Volume 1, Issue 2, July-December 2019 Study Program Doctor of Education Faculty of Teacher Training and Education, Universitas Bengkulu

1 E-ISSN 2685-709X P-ISSN 2685-905X Volume 1, Issue 2, July-December 2019 Study Program Doctor of Education Faculty of Teacher Training and Education, Universitas Bengkulu