well its been a long time since I wrote any amount of code due to my former job and raising a family
so I guess Im going to take some classes in code again.
c#, java, python. and maybe php for starters and more later
refresher course in code
Moderators: b1o, jkerr82508
refresher course in code
registered Linux user number 505431
Amateur radio call sign KC3TEC
miracle (mere-ack-ull) :
the aspiration of the indigent, the expectation of the indolent, and the inspiration of the ignorant.
Im so old even dirt was my apprentice!
Amateur radio call sign KC3TEC
miracle (mere-ack-ull) :
the aspiration of the indigent, the expectation of the indolent, and the inspiration of the ignorant.
Im so old even dirt was my apprentice!
Re: refresher course in code
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"
"There are no stupid questions - Only stupid answers!"
Re: refresher course in code
heres a quick one in c++ it calculates the size of a hdd by the parameter you type in and displays the size in megabytes.
integers (a,b,c ) and it works
#include <iostream>
using namespace std;
int main()
{
int a = 35202;
int b = 16;
int c = 63;
int d = 512;
int e = 1024;
int f = 1024;
int sum = a * b * c * d / e / f;
// this is just a down and dirty hdd size calculator.
cout << sum;
return 0;
}
integers (a,b,c ) and it works
#include <iostream>
using namespace std;
int main()
{
int a = 35202;
int b = 16;
int c = 63;
int d = 512;
int e = 1024;
int f = 1024;
int sum = a * b * c * d / e / f;
// this is just a down and dirty hdd size calculator.
cout << sum;
return 0;
}
registered Linux user number 505431
Amateur radio call sign KC3TEC
miracle (mere-ack-ull) :
the aspiration of the indigent, the expectation of the indolent, and the inspiration of the ignorant.
Im so old even dirt was my apprentice!
Amateur radio call sign KC3TEC
miracle (mere-ack-ull) :
the aspiration of the indigent, the expectation of the indolent, and the inspiration of the ignorant.
Im so old even dirt was my apprentice!
Re: refresher course in code
Is all Elliniká to me.
- dedanna1029
- Sound-Berserk
- Posts: 8780
- Joined: 14 Mar 2010, 20:29
- Contact:
Re: refresher course in code
gnuuser wrote:heres a quick one in c++ it calculates the size of a hdd by the parameter you type in and displays the size in megabytes.
integers (a,b,c ) and it works
#include <iostream>
using namespace std;
int main()
{
int a = 35202;
int b = 16;
int c = 63;
int d = 512;
int e = 1024;
int f = 1024;
int sum = a * b * c * d / e / f;
// this is just a down and dirty hdd size calculator.
cout << sum;
return 0;
}
Can this be set somehow to display gigabytes?
I'd rather be a free person who fears terrorists, than be a "safe" person who fears the government.
No gods, no masters.
"A druid is by nature anarchistic, that is, submits to no one."
http://uk.druidcollege.org/faqs.html
No gods, no masters.
"A druid is by nature anarchistic, that is, submits to no one."
http://uk.druidcollege.org/faqs.html
Re: refresher course in code
after line int f add line with int g = 1000;
int sum = a * b * c * d / e / f / g; ( the g has been added here)
and it should work
int a is the number of cylinders, int b is the number of heads, and int c is the number of sectors.
int sum = a * b * c * d / e / f / g; ( the g has been added here)
and it should work
int a is the number of cylinders, int b is the number of heads, and int c is the number of sectors.
registered Linux user number 505431
Amateur radio call sign KC3TEC
miracle (mere-ack-ull) :
the aspiration of the indigent, the expectation of the indolent, and the inspiration of the ignorant.
Im so old even dirt was my apprentice!
Amateur radio call sign KC3TEC
miracle (mere-ack-ull) :
the aspiration of the indigent, the expectation of the indolent, and the inspiration of the ignorant.
Im so old even dirt was my apprentice!
- dedanna1029
- Sound-Berserk
- Posts: 8780
- Joined: 14 Mar 2010, 20:29
- Contact:
Re: refresher course in code
Thanks!
I'd rather be a free person who fears terrorists, than be a "safe" person who fears the government.
No gods, no masters.
"A druid is by nature anarchistic, that is, submits to no one."
http://uk.druidcollege.org/faqs.html
No gods, no masters.
"A druid is by nature anarchistic, that is, submits to no one."
http://uk.druidcollege.org/faqs.html