mirror of
https://github.com/VictorEijkhout/TheArtOfHPC_vol3_cppf08programming.git
synced 2026-01-24 22:44:48 +09:00
33 lines
595 B
C++
33 lines
595 B
C++
/****************************************************************
|
|
****
|
|
**** This program source is part of
|
|
**** Introduction to High-performance Scientific Computing
|
|
**** by Victor Eijkhout
|
|
**** copyright Victor Eijkhout 2011-2020
|
|
****
|
|
**** gdb example program
|
|
****
|
|
****************************************************************/
|
|
|
|
#include <iostream>
|
|
using std::cout;
|
|
|
|
//codesnippet gdbhello
|
|
void say(int n) {
|
|
cout << "hello world " << n << '\n';
|
|
}
|
|
|
|
int main() {
|
|
|
|
for (int i=0; i<10; ++i) {
|
|
int ii;
|
|
ii = i*i;
|
|
++ii;
|
|
say(ii);
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
//codesnippet end
|
|
|