0% found this document useful (0 votes)
4 views2 pages

3rd Question Dsa

The document describes a C++ program that uses GDB OnLine, an online compiler and debugger tool. It prompts the user to input their age, height, and weight, and checks if the values meet certain criteria to determine validity. The program concludes by printing either 'valid' or 'error' based on the input conditions.

Uploaded by

Nomesh Mudipalli
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)
4 views2 pages

3rd Question Dsa

The document describes a C++ program that uses GDB OnLine, an online compiler and debugger tool. It prompts the user to input their age, height, and weight, and checks if the values meet certain criteria to determine validity. The program concludes by printing either 'valid' or 'error' based on the input conditions.

Uploaded by

Nomesh Mudipalli
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/ 2

ain.

cpp Language C++


1/******************** ******************************
2
3 Welcome to GDB OnLine.
4 GDB on Line is an online
compiler and debugger tool for C, C++,
5 C#, VB, Perl, Swift, Prolog, Javascript, Pascal, HTML, CSS, JSS Python, PHP, Ruby,
6 Code, Compile, Run and Debug online
from anywhere in world.
** **************

#include<iostream> ***************************************************/
10 using namespace std;
11
12 void check()
13 int age;
14 float height, weight;
15 cout"enter age\n";
16
cinages
17
18
cout"\nenter
cin>>height;
height \n";
19
cout <"\nenter weight\n";
28
21
cin>>weight;
if(age 18R&age <258aheight>=5.288height<=5.68weight>=458&weight<=60)
23
24
cout"valid
else
";
25 cout<"error";
26
27
28 int main()
29 check();
30 return e3
31
C onlinegdb.com M
Apps Other bookmar

Run Debug Stop Share Save Beautifly Language CC++


main.cpp
1-/******************************************************************************
Welcome to GDB OnLine.
4 GDB On Line is an onLine compiler and debugger tool for C, C++, Python, PHP, Ruby,
5 C#, VB, Perl, Swift, ProLog, Javas cript, Pas cal, HTML, CSS, JS
6 Code, Compile, Run and Debug onLine from anywhere in worLd.

8 *******************************************************************************/
9 #include<iostream>
10 using namespace std;
11
12 void check()
13 { int age;
14 float height, weight;
15 cout "enter age \n";
16 cin>>age;
17 cOut "nenter height\n"
input
enter age

23

enter height
5.4

enter weight
55
valid

Program finished with code 0


exit
Press ENTER to exit console
-|

You might also like