Official ENIDUST Forum
Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3

Author Topic: C++  (Read 8477 times)

RhinoRace

  • User
  • Posts: 175
    • View Profile
Re: C++
« Reply #15 on: January 15, 2016, 08:19:13 »

Logged

Lich555

  • User
  • Posts: 1063
    • View Profile
    • Moje zdj?cia
Re: C++
« Reply #16 on: January 17, 2016, 09:44:44 »

Logged

Ajamaharis

  • User
  • Posts: 123
    • View Profile
Re: C++
« Reply #17 on: January 17, 2016, 10:43:08 »

Code: [Select]
#include <stdio.h>
#include <stdlib>
 
int main(void)
{
    int mantysad,mantysaf;
    double dx, dxp1;
    float dy, dyp1;
   
    mantysad = 0; dx = 1.0; dxp1 = 2.0;
    mantysaf = 0; dy = 1.0; dyp1 = 2.0;
   
while(dxp1 > 1.0)
    {
        dx *= 0.5;
        dxp1 = 1.0 + dx;
        mantysad++;
    printf("%d\tDouble Epsylon maszynowy (double) = %g\n",mantysad,dxp1);

        if(dyp1 > 1.0)
        {
             dy *= 0.5;
            dyp1 = 1.0 + dy;
            mantysaf++;
        }       
    }
        system("CLS");
    printf("Double\nEpsylon maszynowy (double) = %g. \nLiczba bitow mantysy = %d\n", 2*dx, mantysad-1);
    printf("\nFloat\nEpsylon maszynowy (float) = %g. \nLiczba bitow mantysy = %d\n", 2*dy, mantysaf-1);
        getchar();
}
nie przejmuj si? ?e cze?ci nie rozumiesz bo to C a nie C++ ^^

generalnie chodzi o wci?cia i przejrzysto?? kodu. u?atwiaj? czytanie oraz analiz? kodu
Logged

Lich555

  • User
  • Posts: 1063
    • View Profile
    • Moje zdj?cia
Re: C++
« Reply #18 on: January 17, 2016, 14:35:06 »

Logged

RhinoRace

  • User
  • Posts: 175
    • View Profile
Re: C++
« Reply #19 on: January 18, 2016, 08:50:02 »

Logged

Lich555

  • User
  • Posts: 1063
    • View Profile
    • Moje zdj?cia
Re: C++
« Reply #20 on: January 18, 2016, 16:08:08 »

To co podajemy po #include <tutaj> to niekoniecznie jest biblioteka?
Logged

RhinoRace

  • User
  • Posts: 175
    • View Profile
Re: C++
« Reply #21 on: January 19, 2016, 08:08:49 »

« Last Edit: January 19, 2016, 08:11:42 by RhinoRace »
Logged

mrksiedzu

  • User
  • Posts: 254
    • View Profile
Re: C++
« Reply #22 on: January 19, 2016, 15:47:53 »

Quote
(z kontekstu zrozumia?em, ?e chodzi o nazw?) tylko rozszerzeniem c lub cpp.
PS: przepraszam za g?upie nazwy i "includowanie"
« Last Edit: January 19, 2016, 15:53:16 by mrksiedzu »
Logged

RhinoRace

  • User
  • Posts: 175
    • View Profile
Re: C++
« Reply #23 on: January 19, 2016, 16:56:10 »

Logged

Lich555

  • User
  • Posts: 1063
    • View Profile
    • Moje zdj?cia
Re: C++
« Reply #24 on: January 19, 2016, 17:42:35 »

Logged

mrksiedzu

  • User
  • Posts: 254
    • View Profile
Re: C++
« Reply #25 on: January 19, 2016, 17:46:11 »

« Last Edit: January 19, 2016, 18:25:49 by mrksiedzu »
Logged

RhinoRace

  • User
  • Posts: 175
    • View Profile
Re: C++
« Reply #26 on: January 20, 2016, 08:27:18 »

Logged

Lich555

  • User
  • Posts: 1063
    • View Profile
    • Moje zdj?cia
Re: C++
« Reply #27 on: January 20, 2016, 17:44:26 »

Logged

RhinoRace

  • User
  • Posts: 175
    • View Profile
Re: C++
« Reply #28 on: January 21, 2016, 08:30:32 »

Logged

Lich555

  • User
  • Posts: 1063
    • View Profile
    • Moje zdj?cia
Re: C++
« Reply #29 on: January 21, 2016, 09:24:01 »

Logged
Pages: 1 [2] 3