Programming Exercise 2-7 Tasks Test Case Complete Test case 2 Labl Test Case Complete Test case 3 Test Case Incomplete Test case 4 Input 30980234.5001928 Output Enter decimal value: 30980234.5001928 Decimal nearest value: 30980234 Results % Ⓡ 30980235 Show Details > main.cpp 1 #include 2 #include 3 using namespace std; 4 // Driver code 5 int main() 6 { 7 8 a 9 10 10 11 12 13 14 15 16 17 18} 19 | // variable declaration. float declVal; cout<<"Enter decimal value: "; // taking input from user cin>>declVal; // convert decimal value to nearest int value. int result round (declVal); // print the desired output cout<<"Decimal nearest value: "< Terminal X + Enter decimal value: rm -f a.out g++ -Wall -std=c++0x main.cpp ./a.out Decimal nearest value: 30980235sandbox $ sandbox $ sandbox $ g++ -Wall -std=c++0x main.cpp sandbox $ ./a.out Enter decimal value:
Programming Exercise 2-7 Tasks Test Case Complete Test case 2 Labl Test Case Complete Test case 3 Test Case Incomplete Test case 4 Input 30980234.5001928 Output Enter decimal value: 30980234.5001928 Decimal nearest value: 30980234 Results % Ⓡ 30980235 Show Details > main.cpp 1 #include 2 #include 3 using namespace std; 4 // Driver code 5 int main() 6 { 7 8 a 9 10 10 11 12 13 14 15 16 17 18} 19 | // variable declaration. float declVal; cout<<"Enter decimal value: "; // taking input from user cin>>declVal; // convert decimal value to nearest int value. int result round (declVal); // print the desired output cout<<"Decimal nearest value: "< Terminal X + Enter decimal value: rm -f a.out g++ -Wall -std=c++0x main.cpp ./a.out Decimal nearest value: 30980235sandbox $ sandbox $ sandbox $ g++ -Wall -std=c++0x main.cpp sandbox $ ./a.out Enter decimal value:
Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter7: File Handling And Applications
Section: Chapter Questions
Problem 7PE
Related questions
Question
debug plss
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 3 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT