Results 1 to 25 of 89
Thread: ++
Hybrid View
-
13th February 2008 22:45 #1
++
++ :
#include <cstdlib>
#include <iostream>
using namespace std;
int r, S; P;
int f()
{
S=2*r*r;
P=2 * 3,14 * r;
cout<< "S= " << S;
cout<< "\n";
cout<< "P= " << P;
cout<< "\n";
cout<< "\n";
cout<< "\n";
}
int main(int argc, char *argv[])
{
cout<< "Enter value for radius: ";
cin>> r;
cout<< "\n";
f();
system("PAUSE");
return EXIT_SUCCESS;
}
, =3,14, r*r, r , .ASrock B75-Pro3/i5-3770 3.4GHz/Corsair Vengance 24GB DDR3-1600/GB GTX 1060 6GB/CM GX-Lite 500W/DELL U2312HM
-
13th February 2008 22:54 #2
-
13th February 2008 22:59 #3
. . .
edit: , 2 , .Last edited by DeViL12; 13th February 2008 at 23:04.
ASrock B75-Pro3/i5-3770 3.4GHz/Corsair Vengance 24GB DDR3-1600/GB GTX 1060 6GB/CM GX-Lite 500W/DELL U2312HM
-
13th February 2008 23:05 #4
-
13th February 2008 23:17 #5
-
13th February 2008 23:16 #6
, . P ka :"int double P" ?
ASrock B75-Pro3/i5-3770 3.4GHz/Corsair Vengance 24GB DDR3-1600/GB GTX 1060 6GB/CM GX-Lite 500W/DELL U2312HM
-
13th February 2008 23:26 #7
:float double P; ? . r , 4 :
#include <cstdlib>
#include <iostream>
#include <math.h>
using namespace std;
int r, P, S;
int f()
{
S=2*(r,2);
P=2*3.14f*r;
cout<< "S= " << S;
cout<< "\n";
cout<< "P= " << P;
cout<< "\n";
cout<< "\n";
cout<< "\n";
}
int main(int argc, char *argv[])
{
cout<< "Enter value for radius: ";
cin>> r;
cout<< "\n";
f();
system("PAUSE");
return EXIT_SUCCESS;
}ASrock B75-Pro3/i5-3770 3.4GHz/Corsair Vengance 24GB DDR3-1600/GB GTX 1060 6GB/CM GX-Lite 500W/DELL U2312HM
-
13th February 2008 23:29 #8
-
13th February 2008 23:32 #9
++ sorry

float , 2 .ASrock B75-Pro3/i5-3770 3.4GHz/Corsair Vengance 24GB DDR3-1600/GB GTX 1060 6GB/CM GX-Lite 500W/DELL U2312HM
-
13th February 2008 23:40 #10
#include <math.h>
cout<< "S= " << 2*powf (r, 2);
-
13th February 2008 23:46 #11
4 .
ASrock B75-Pro3/i5-3770 3.4GHz/Corsair Vengance 24GB DDR3-1600/GB GTX 1060 6GB/CM GX-Lite 500W/DELL U2312HM
-
13th February 2008 23:52 #12
-
13th February 2008 23:58 #13
, r , 4 .
ASrock B75-Pro3/i5-3770 3.4GHz/Corsair Vengance 24GB DDR3-1600/GB GTX 1060 6GB/CM GX-Lite 500W/DELL U2312HM
-
14th February 2008 00:04 #14
-
14th February 2008 00:09 #15
:
#include <cstdlib>
#include <iostream>
#include <math.h>
using namespace std;
int r, S;
float P;
const float pi=3.14;
void f()
{
S=2*(r,2);
P=2*pi*r;
cout<< "S= " << S;
cout<< "\n";
cout<< "P= " << P;
cout<< "\n";
cout<< "\n";
cout<< "\n";
}
int main(int argc, char *argv[])
{
cout<< "Enter value for radius: ";
cin>> r;
cout<< "\n";
f();
system("PAUSE");
return EXIT_SUCCESS;
}ASrock B75-Pro3/i5-3770 3.4GHz/Corsair Vengance 24GB DDR3-1600/GB GTX 1060 6GB/CM GX-Lite 500W/DELL U2312HM
-
14th February 2008 00:11 #16
, :
#include <cstdlib>
#include <iostream>
#include <math.h>
using namespace std;
int r, P, S;
void f()
{
S=2*powf(r,2);
P=2*3,14*r;
cout<< "S= " << S;
cout<< "\n";
cout<< "P= " << P;
cout<< "\n";
cout<< "\n";
cout<< "\n";
}
int main(int argc, char *argv[])
{
cout<< "Enter value for radius: ";
cin>> r;
cout<< "\n";
f();
system("PAUSE");
return EXIT_SUCCESS;
}
-
14th February 2008 00:12 #17
. !
ASrock B75-Pro3/i5-3770 3.4GHz/Corsair Vengance 24GB DDR3-1600/GB GTX 1060 6GB/CM GX-Lite 500W/DELL U2312HM
-
14th February 2008 01:09 #18
math.h : M_PI. - ( -), .
Internet - it doesn't make you stupid, it just makes your stupidity more accessible to others
-
14th February 2008 01:28 #19
-
14th February 2008 01:43 #20
Code:#define sqr(x) ((x)*(x))
, . .
"640K ught to be enough for anybody" - Bill Gates, 1981
::Machine specs::Fract::AGG::::Baileys::blog::YouTube channel
-
14th February 2008 01:55 #21
-
14th February 2008 15:33 #22, . .
"640K ught to be enough for anybody" - Bill Gates, 1981
::Machine specs::Fract::AGG::::Baileys::blog::YouTube channel
-
14th February 2008 16:17 #23Registered User
Join Date: Dec:2007
Location:
Posts: 655
-
14th February 2008 16:24 #24
-
14th February 2008 17:02 #25




Reply With Quote
, float, float double.


Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in