Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F120697477
assert.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Jul 6, 09:53
Size
289 B
Mime Type
text/x-c
Expires
Tue, Jul 8, 09:53 (2 d)
Engine
blob
Format
Raw Data
Handle
27232428
Attached To
R9360 PCSC_git
assert.cpp
View Options
#include <cassert>
#include <cmath>
#include <iostream>
int main(int argc, char *argv[]) {
double a;
std::cout << "Enter a non-negative number\n";
std::cin >> a;
assert(a >= 0.0);
std::cout << "The square root of " << a;
std::cout << " is " << sqrt(a) << "\n";
return 0;
}
Event Timeline
Log In to Comment