Thread: C++ , HELP!!
View Single Post
Old 25 Sep 07, 12:51   #4 (permalink)
Զամունդացի դեմք
VIP Ultra Club
voter's Avatar
Join Date: Dec 2006
Age: 51
Posts: 8,242
Blog Entries: 15
Rep Power: 26 voter is on a distinguished road
Պատասխանը: C++ , HELP!!

Опеределив функцию перед main

Quote:
function gippotes(float c_fltA; float c_fltB)
{return sqrt(c_fltA*c_fltA + c_fltB*c_fltB);
}
Заместо
fltGip = sqrt(fltA*fltA + fltB*fltB);

пишеш gippotes(c_fltA; c_fltB);

Quote:
#include <iostream>
#include <math.h>
#include <conio.h> // 10
using namespace std; // 11

function gippotes(float c_fltA; float c_fltB)
{return sqrt(c_fltA*c_fltA + c_fltB*c_fltB);
} // 12

void main (void) // 13
{ float c_fltA;
float c_fltB;
float fltGip1;
c_fltA = 3;
c_fltB = 4;
cout<<"\nKatet -\t"
<<c_fltA
<<"\nGipotenuza-\t"
<<c_fltB;
fltGip1 = gippotes(c_fltA; c_fltB);
cout<<"\n 2-oi katet -\t"
<<fltGip1;
float fltA; // 15
float fltB; // 16
cout<<"\nVvedite katet\t"; // 18
cin>>fltA; // 19
cout<<"vvedite gipotenuzu\t"; // 20
cin>>fltB; // 21
float fltGip; // 22
fltGip = gippotes(c_fltA; c_fltB); // 23
cout<<"2-oi katet = " << fltGip; // 24
cout<<"\n\tBYE !"; // ПОКА 25
_getch(); // 26
} // 27
 
voter is offline  
Reply With Quote
 
 

All times are GMT +4. The time now is 20:15.

 v.0.91  v.1  v.2 XML Feeds JavaScript Feeds


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.



Liveinternet
User Control Panel
Networking Networking
Social Groups Social Groups
Pictures & Albums All Albums
What's up
Who's Online Who's Online
Top Statistics Top Statistics
Most Active Forumjans Most Active Forumjans

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111