<?xml version="1.0" encoding="iso-8859-2"?>
<rss version="2.0">
<channel>
<title>cplusplus</title>
<link>http://www.cplusplus.pun.pl</link>
<description> cplusplus</description>
<language>pl</language>
<docs>http://backend.userland.com/rss</docs>
<item>
<title>19 kwietnia 2011</title>
<link>http://www.cplusplus.pun.pl/viewtopic.php?pid=121#p121</link>
<guid isPermaLink="false">121@http://www.cplusplus.pun.pl</guid>
<description><![CDATA[#include&lt;iostream&gt;<br />#include&lt;string.h&gt;<br />#include&lt;fstream&gt;<br />using namespace std;<br /><br />struct firma<br />&nbsp; &nbsp;{<br />&nbsp; &nbsp;int nr;<br />&nbsp; &nbsp;string imie;<br />&nbsp; &nbsp;string nazwisko;<br />&nbsp; &nbsp;string adres;<br />&nbsp; &nbsp;};<br /><br />int main()<br />{<br />firma rolka[20];<br />int i, ile;<br /><br />cout&lt;&lt;&quot; Wprowadzanie danych do bazy:&quot;&lt;&lt;endl;<br /><br />&nbsp; &nbsp; do<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; cout&lt;&lt;&quot; Podaj ile osob wprowadzic: &quot;;<br />&nbsp; &nbsp; cin&gt;&gt;ile;<br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; while((ile&lt;1)||(ile&gt;20));<br />&nbsp; &nbsp; <br />cout&lt;&lt;endl;<br />for(i=0;i&lt;ile;i++)<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; rolka[i].nr=i;<br />&nbsp; &nbsp; cout&lt;&lt;&quot; Podaj imie: &quot;;<br />&nbsp; &nbsp; cin&gt;&gt;rolka[i].imie;<br />&nbsp; &nbsp; cout&lt;&lt;&quot; Podaj nazwisko: &quot;;<br />&nbsp; &nbsp; cin&gt;&gt;rolka[i].nazwisko;<br />&nbsp; &nbsp; cout&lt;&lt;&quot; Podaj adres: &quot;;<br />&nbsp; &nbsp; cin&gt;&gt;rolka[i].adres;<br />&nbsp; &nbsp; cout&lt;&lt;endl;<br />&nbsp; &nbsp; }<br /><br />cout&lt;&lt;&quot; Co dalej chcesz zrobić &quot;&lt;&lt;endl;<br />cout&lt;&lt;&quot; 1 - wyswietla info o kliencie &quot;&lt;&lt;endl;<br />cout&lt;&lt;&quot; 2 - wyswietla zbiorcze info o wszystkich klientach &quot;&lt;&lt;endl;<br />cout&lt;&lt;&quot; 3 - usuwa danego klienta &quot;&lt;&lt;endl;<br />cout&lt;&lt;&quot; 4 - exportuje dane z bazy do pliku &quot;&lt;&lt;endl;<br />cout&lt;&lt;endl;<br />cout&lt;&lt;&quot; Co wybierasz: &quot;&lt;&lt;endl;<br />cout&lt;&lt;endl;<br /><br />int wybor;<br />cin&gt;&gt;wybor;<br />&nbsp; &nbsp; <br />switch(wybor)<br />&nbsp; &nbsp;{<br />&nbsp; &nbsp;case 1:<br />&nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; string szukanenazwisko;<br />&nbsp; &nbsp; &nbsp; cout&lt;&lt;&quot; Podaj nazwisko do wyszukania: &quot;;<br />&nbsp; &nbsp; &nbsp; cin&gt;&gt;szukanenazwisko;<br />&nbsp; &nbsp; &nbsp; for(i=0;i&lt;ile;i++)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(szukanenazwisko==rolka[i].nazwisko)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout&lt;&lt;rolka[i].nr&lt;&lt;&quot;\t&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout&lt;&lt;rolka[i].imie&lt;&lt;&quot;\t&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout&lt;&lt;rolka[i].nazwisko&lt;&lt;&quot;\t&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout&lt;&lt;rolka[i].adres&lt;&lt;&quot;\t&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout&lt;&lt;endl;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout&lt;&lt;&quot; Brak takiego klienta &quot;&lt;&lt;endl;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br />&nbsp; &nbsp; &nbsp; cout&lt;&lt;endl;<br />&nbsp; &nbsp; &nbsp; break;<br />&nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp;case 2:<br />&nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; cout&lt;&lt;&quot; Wyswietla info o wszystkich klientach &quot;&lt;&lt;endl;<br />&nbsp; &nbsp; &nbsp; cout&lt;&lt;endl;<br />&nbsp; &nbsp; &nbsp; cout&lt;&lt;&quot;numer&quot;&lt;&lt;&quot;\t&quot;&lt;&lt;&quot;imie&quot;&lt;&lt;&quot;\t&quot;&lt;&lt;&quot;nazwisko&quot;&lt;&lt;&quot;\t&quot;&lt;&lt;&quot;adres&quot;&lt;&lt;endl;<br />&nbsp; &nbsp; &nbsp; for(i=0;i&lt;ile;i++)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cout&lt;&lt;rolka[i].nr&lt;&lt;&quot;\t&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cout&lt;&lt;rolka[i].imie&lt;&lt;&quot;\t&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cout&lt;&lt;rolka[i].nazwisko&lt;&lt;&quot;\t&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cout&lt;&lt;rolka[i].adres&lt;&lt;endl;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br />&nbsp; &nbsp; &nbsp; cout&lt;&lt;endl;<br />&nbsp; &nbsp; &nbsp; break;<br />&nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp;case 3:<br />&nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; string szukanenazwisko;<br />&nbsp; &nbsp; &nbsp; cout&lt;&lt;&quot; Podaj nazwisko do usuniecia: &quot;;<br />&nbsp; &nbsp; &nbsp; cin&gt;&gt;szukanenazwisko;<br />&nbsp; &nbsp; &nbsp; for(i=0;i&lt;ile;i++)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(szukanenazwisko==rolka[i].nazwisko)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rolka[i].nr=' ';<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rolka[i].imie=' ';<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rolka[i].nazwisko=' ';<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rolka[i].adres=' ';<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br />&nbsp; &nbsp; &nbsp; cout&lt;&lt;endl;<br />&nbsp; &nbsp; &nbsp; cout&lt;&lt;&quot;numer&quot;&lt;&lt;&quot;\t&quot;&lt;&lt;&quot;imie&quot;&lt;&lt;&quot;\t&quot;&lt;&lt;&quot;nazwisko&quot;&lt;&lt;&quot;\t&quot;&lt;&lt;&quot;adres&quot;&lt;&lt;endl;<br />&nbsp; &nbsp; &nbsp; for(i=0;i&lt;ile;i++)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cout&lt;&lt;rolka[i].nr&lt;&lt;&quot;\t&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cout&lt;&lt;rolka[i].imie&lt;&lt;&quot;\t&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cout&lt;&lt;rolka[i].nazwisko&lt;&lt;&quot;\t&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cout&lt;&lt;rolka[i].adres&lt;&lt;endl;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br />&nbsp; &nbsp; &nbsp; cout&lt;&lt;&quot; Klient: &quot;&lt;&lt;szukanenazwisko&lt;&lt;&quot; zostal usuniety&quot;&lt;&lt;endl;<br />&nbsp; &nbsp; &nbsp; cout&lt;&lt;endl;<br />&nbsp; &nbsp; &nbsp; break;<br />&nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp;case 4:<br />&nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; cout&lt;&lt;&quot; 4 &quot;&lt;&lt;endl;<br />&nbsp; &nbsp; &nbsp; break;<br />&nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp;default:<br />&nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; cout&lt;&lt;&quot; Bledne dane&quot;&lt;&lt;endl;<br />&nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp;}<br />cout&lt;&lt;endl;<br />system(&quot;pause&quot;);<br />}]]></description>
<pubDate>Wtorek 9 PaÂdziernik</pubDate>
<comments>Wtorek 9 PaÂdziernik</comments>
</item>
<item>
<title>19 kwietnia 2011</title>
<link>http://www.cplusplus.pun.pl/viewtopic.php?pid=119#p119</link>
<guid isPermaLink="false">119@http://www.cplusplus.pun.pl</guid>
<description><![CDATA[wrzucać tu wszystko co jest robione na lekcji]]></description>
<pubDate>Czwartek 14 KwiecieĹ</pubDate>
<comments>Czwartek 14 KwiecieĹ</comments>
</item>
<item>
<title>5 kwietnia 2011</title>
<link>http://www.cplusplus.pun.pl/viewtopic.php?pid=115#p115</link>
<guid isPermaLink="false">115@http://www.cplusplus.pun.pl</guid>
<description><![CDATA[/*<br />zad.5.<br />Z kolejnych liczb z zakresu od 122 do 1024 oblicza ilość elementów parzystych i podzielnych przez 5.<br />Oblicza jaki jest procent liczb słaniających warunki.<br />*/<br /><br />#include&lt;iostream.h&gt;<br /><br />int ilosc()<br />{<br />int i, ilosca=0;<br />for(i=122;i&lt;=1024;i++)<br />&nbsp; {<br />&nbsp; if(i%2==0)<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; if(i%5==0)<br />&nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; ilosca++;<br />&nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; }<br />&nbsp; }<br />return ilosca;<br />}<br /><br />int procent()<br />{<br />int procenta=0;<br />procenta=100*ilosc()/902;<br />return procenta;<br />}<br /><br />int main()<br />{<br />cout&lt;&lt;&quot;ilosc = &quot;&lt;&lt;ilosc()&lt;&lt;endl;<br />cout&lt;&lt;&quot;procent spełniających = &quot;&lt;&lt;procent()&lt;&lt;&quot;%&quot;&lt;&lt;endl;<br />system(&quot;pause&quot;);<br />}]]></description>
<pubDate>Âroda 6 KwiecieĹ</pubDate>
<comments>Âroda 6 KwiecieĹ</comments>
</item>
<item>
<title>5 kwietnia 2011</title>
<link>http://www.cplusplus.pun.pl/viewtopic.php?pid=114#p114</link>
<guid isPermaLink="false">114@http://www.cplusplus.pun.pl</guid>
<description><![CDATA[/*<br />zad.4.<br />Program wypisujący z kolejnych liczb z zakresu od -122 do +122 ilośc elementów nieparzystych.<br />*/<br /><br />#include&lt;iostream.h&gt;<br /><br />int ilosc()<br />{<br />int i, ilosca=0;<br />for(i=-122;i&lt;=122;i++)<br />&nbsp; {<br />&nbsp; if(i%2==1)<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; ilosca++;<br />&nbsp; &nbsp; }<br />&nbsp; }<br />return ilosca;<br />}<br /><br />int main()<br />{<br />cout&lt;&lt;&quot;ilosc = &quot;&lt;&lt;ilosc()&lt;&lt;endl;<br />system(&quot;pause&quot;);<br />}]]></description>
<pubDate>Âroda 6 KwiecieĹ</pubDate>
<comments>Âroda 6 KwiecieĹ</comments>
</item>
<item>
<title>5 kwietnia 2011</title>
<link>http://www.cplusplus.pun.pl/viewtopic.php?pid=113#p113</link>
<guid isPermaLink="false">113@http://www.cplusplus.pun.pl</guid>
<description><![CDATA[/*<br />zad.3.<br />Program obliczający i wypisujący z kolejnych liczb z zakresu od -12 do 1222 tylko elementy parzyste i wypisujący ich ilość.<br />*/<br /><br />#include&lt;iostream.h&gt;<br /><br />int ilosc()<br />{<br />int i, ilosca=0;<br />for(i=-12;i&lt;=1222;i++)<br />&nbsp; {<br />&nbsp; if(i%2==0)<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; ilosca++;<br />&nbsp; &nbsp; }<br />&nbsp; }<br />return ilosca;<br />}<br /><br />int main()<br />{<br />cout&lt;&lt;&quot;ilosc = &quot;&lt;&lt;ilosc()&lt;&lt;endl;<br />system(&quot;pause&quot;);<br />}]]></description>
<pubDate>Âroda 6 KwiecieĹ</pubDate>
<comments>Âroda 6 KwiecieĹ</comments>
</item>
<item>
<title>5 kwietnia 2011</title>
<link>http://www.cplusplus.pun.pl/viewtopic.php?pid=112#p112</link>
<guid isPermaLink="false">112@http://www.cplusplus.pun.pl</guid>
<description><![CDATA[/*<br />zad.2.<br />Program obliczający i wypisujący sumę kwadratów kolejnych liczb z zakresu od 12 do 112.<br />*/<br /><br />#include&lt;iostream.h&gt;<br />#include&lt;math.h&gt;<br /><br />int suma()<br />{<br />int i, sumaa=0;<br />for(i=12;i&lt;=112;i++)<br />&nbsp; {<br />&nbsp; sumaa=sumaa+pow(i,2);<br />&nbsp; }<br />return sumaa;<br />}<br /><br />int main()<br />{<br />cout&lt;&lt;&quot;suma = &quot;&lt;&lt;suma()&lt;&lt;endl;<br />system(&quot;pause&quot;);<br />}]]></description>
<pubDate>Âroda 6 KwiecieĹ</pubDate>
<comments>Âroda 6 KwiecieĹ</comments>
</item>
<item>
<title>5 kwietnia 2011</title>
<link>http://www.cplusplus.pun.pl/viewtopic.php?pid=111#p111</link>
<guid isPermaLink="false">111@http://www.cplusplus.pun.pl</guid>
<description><![CDATA[/*<br />zad.1.<br />Program obliczający i wypisujący kwadrat z dowolnej liczby.<br />*/<br /><br />#include&lt;iostream.h&gt;<br />#include&lt;math.h&gt;<br /><br />int kwadrat()<br />{<br />int a, kwadrata;<br />cout&lt;&lt;&quot;podaj a&quot;&lt;&lt;endl;<br />cin&gt;&gt;a;<br />kwadrata=pow(a,2);<br />return kwadrata;<br />}<br /><br />int main()<br />{<br />cout&lt;&lt;&quot;kwadrat = &quot;&lt;&lt;kwadrat()&lt;&lt;endl;<br />system(&quot;pause&quot;);<br />}]]></description>
<pubDate>Âroda 6 KwiecieĹ</pubDate>
<comments>Âroda 6 KwiecieĹ</comments>
</item>
<item>
<title>5 kwietnia 2011</title>
<link>http://www.cplusplus.pun.pl/viewtopic.php?pid=110#p110</link>
<guid isPermaLink="false">110@http://www.cplusplus.pun.pl</guid>
<description><![CDATA[zad.1.<br />Program obliczający i wypisujący kwadrat z dowolnej liczby.<br /><br />zad.2. <br /><br />Program obliczający i wypisujący sumę kwadratów kolejnych liczb z zakresu od 12 do 112.<br /><br />zad.3.<br />Program obliczający i wypisujący z kolejnych liczb z zakresu od -12 do +1222<br />tylko elementy parzyste i wypisujący ich ilość.<br /><br />zad.4.<br />Program wypisujący z kolejnych liczb z zakresu od -122 do +122 ilość elementów nieparzystych.<br /><br />zad.5.<br />Z kolejnych liczb z zakresu od 122 do 1024 oblicza ilość elementów parzystych i podzielnych przez 5.<br />Oblicza jaki jest procent liczb spełniających warunki.]]></description>
<pubDate>Âroda 6 KwiecieĹ</pubDate>
<comments>Âroda 6 KwiecieĹ</comments>
</item>
<item>
<title>15 marca 2011</title>
<link>http://www.cplusplus.pun.pl/viewtopic.php?pid=103#p103</link>
<guid isPermaLink="false">103@http://www.cplusplus.pun.pl</guid>
<description><![CDATA[/*<br />zad.3.<br />Program obliczający i wypisujący, w zależności od wartosci zmiennej x :<br />x=1 pole koła<br />x=2 pole prostopadłościanu<br />x=3 pole trójkąta<br />*/<br /><br />#include&lt;iostream.h&gt;<br />#include&lt;math.h&gt;<br /><br />double p_kola()<br />{<br />double pk;<br />int r;<br />do<br />&nbsp; {<br />&nbsp; cout&lt;&lt;&quot;podaj r&gt;0&quot;&lt;&lt;endl;<br />&nbsp; cin&gt;&gt;r;<br />&nbsp; }<br />while(r&lt;=0);<br />pk=M_PI*pow(r,2);<br />return pk;<br />}<br /><br />int p_prostopadloscianu()<br />{<br />int pp,a,b,c;<br />pp=2*a*b+2*a*c+2*b*c;<br />return pp;<br />}<br /><br />double p_trojkata()<br />{<br />double ptr;<br />int a, h;<br />do<br />&nbsp; {<br />&nbsp; cout&lt;&lt;&quot;podaj a&gt;0: &quot;&lt;&lt;endl;<br />&nbsp; cin&gt;&gt;a;<br />&nbsp; }<br />while(a&lt;=0);<br /><br />do<br />&nbsp; {<br />&nbsp; cout&lt;&lt;&quot;podaj h&gt;0: &quot;&lt;&lt;endl;<br />&nbsp; cin&gt;&gt;h;<br />&nbsp; }<br />while(h&lt;=0);<br /><br />ptr=(a*h)/2;<br />return ptr;<br />}<br /><br />int main()<br />{<br />int x,r,a,b,c,h;<br />cout&lt;&lt;&quot;1 - pole koła&quot;&lt;&lt;endl;<br />cout&lt;&lt;&quot;2 - pole prostopadłościaniu&quot;&lt;&lt;endl;<br />cout&lt;&lt;&quot;3 - pole trójkąta&quot;&lt;&lt;endl;<br />cout&lt;&lt;&quot;Co wykonać&quot;&lt;&lt;endl;<br />cin&gt;&gt;x;<br /><br />switch(x)<br />{<br />case 1:<br />&nbsp; {<br />&nbsp; cout&lt;&lt;p_kola()&lt;&lt;endl;<br />&nbsp; break;<br />&nbsp; }<br />case 2:<br />&nbsp; {<br />&nbsp; do<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; cout&lt;&lt;&quot;podaj a&gt;0&quot;&lt;&lt;endl;<br />&nbsp; &nbsp; cin&gt;&gt;a;<br />&nbsp; &nbsp; }<br />&nbsp; while(a&lt;=0);<br /><br />&nbsp; do<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; cout&lt;&lt;&quot;podaj b&gt;0&quot;&lt;&lt;endl;<br />&nbsp; &nbsp; cin&gt;&gt;b;<br />&nbsp; &nbsp; }<br />&nbsp; while(b&lt;=0);<br />&nbsp; &nbsp;<br />&nbsp; do<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; cout&lt;&lt;&quot;podaj c&gt;0&quot;&lt;&lt;endl;<br />&nbsp; &nbsp; cin&gt;&gt;c;<br />&nbsp; &nbsp; }<br />&nbsp; while(c&lt;=0);<br />&nbsp; cout&lt;&lt;p_prostopadloscianu()&lt;&lt;endl;<br />&nbsp; break;<br />&nbsp; }<br />case 3:<br />&nbsp; {<br />&nbsp; cout&lt;&lt;p_trojkata()&lt;&lt;endl;<br />&nbsp; }<br />default:<br />&nbsp; {<br />&nbsp; cout&lt;&lt;&quot;Nie ma takiej cyfry&quot;&lt;&lt;endl;<br />&nbsp; }<br />}<br />system(&quot;pause&quot;);<br />}]]></description>
<pubDate>Wtorek 29 Marzec</pubDate>
<comments>Wtorek 29 Marzec</comments>
</item>
<item>
<title>15 marca 2011</title>
<link>http://www.cplusplus.pun.pl/viewtopic.php?pid=102#p102</link>
<guid isPermaLink="false">102@http://www.cplusplus.pun.pl</guid>
<description><![CDATA[/*<br />zad.2.<br />Program obliczający i wypisujący średnią 3 liczb: a b c przy użyciu 2 funkcji: suma i srednia.<br />*/<br /><br />#include&lt;iostream.h&gt;<br /><br />int suma()<br />{<br />int sumaa,a,b,c;<br />cout&lt;&lt;&quot;podaj a, b, c &quot;&lt;&lt;endl;<br />cout&lt;&lt;endl;<br />cin&gt;&gt;a&gt;&gt;b&gt;&gt;c;<br />cout&lt;&lt;endl;<br />sumaa=a+b+c;<br />return sumaa;<br />}<br /><br />double srednia()<br />{<br />int a,b,c;<br />return suma()/3;<br />}<br /><br />int main()<br />{<br />cout&lt;&lt;&quot;Średnia wynosi: &quot;&lt;&lt;srednia()&lt;&lt;endl;<br />system(&quot;pause&quot;);<br />}]]></description>
<pubDate>Wtorek 29 Marzec</pubDate>
<comments>Wtorek 29 Marzec</comments>
</item>
<item>
<title>15 marca 2011</title>
<link>http://www.cplusplus.pun.pl/viewtopic.php?pid=101#p101</link>
<guid isPermaLink="false">101@http://www.cplusplus.pun.pl</guid>
<description><![CDATA[/*<br />zad.1.a.<br />Program obliczający średnią 3 liczb a,b,c n-razy.<br />*/<br /><br />#include&lt;iostream.h&gt;<br />#include&lt;iostream.h&gt;<br /><br />double srednia()<br />{<br />int a, b, c;<br />double sredniaa;<br />cout&lt;&lt;&quot;podaj a b c &quot;&lt;&lt;endl;<br />cin&gt;&gt;a&gt;&gt;b&gt;&gt;c;<br />cout&lt;&lt;endl;<br />sredniaa=(a+b+c)/3;<br />return sredniaa;<br />}<br /><br />int main()<br />{<br />double a,b,c;<br />int n,i;<br />do<br />&nbsp; {<br />&nbsp; cout&lt;&lt;&quot;podaj liczbę powtórzeń&quot;&lt;&lt;endl;<br />&nbsp; cin&gt;&gt;n;<br />&nbsp; }<br />while(n&lt;=0);<br />cout&lt;&lt;endl;<br />for(i=1;i&lt;=n;i++)<br />&nbsp; {&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; cout&lt;&lt;srednia();<br />&nbsp; cout&lt;&lt;endl;<br />&nbsp; }<br />system(&quot;pause&quot;);<br />}]]></description>
<pubDate>Wtorek 29 Marzec</pubDate>
<comments>Wtorek 29 Marzec</comments>
</item>
<item>
<title>15 marca 2011</title>
<link>http://www.cplusplus.pun.pl/viewtopic.php?pid=100#p100</link>
<guid isPermaLink="false">100@http://www.cplusplus.pun.pl</guid>
<description><![CDATA[/*<br />zad.1.<br />Program obliczający średnią 3 liczb a,b,c przy użyciu funkcji srednia.<br />*/<br /><br />#include&lt;iostream.h&gt;<br /><br />int srednia()<br />{<br />int a, b, c, sredniaa;<br />cout&lt;&lt;&quot;podaj a, b i c&quot;&lt;&lt;endl;<br />cin&gt;&gt;a&gt;&gt;b&gt;&gt;c;<br />sredniaa=(a+b+c)/3;<br />return sredniaa;<br />}<br /><br />int main()<br />{<br />cout&lt;&lt;&quot;średnia = &quot;&lt;&lt;srednia()&lt;&lt;endl;<br />system(&quot;pause&quot;);<br />}]]></description>
<pubDate>Wtorek 29 Marzec</pubDate>
<comments>Wtorek 29 Marzec</comments>
</item>
<item>
<title>15 marca 2011</title>
<link>http://www.cplusplus.pun.pl/viewtopic.php?pid=99#p99</link>
<guid isPermaLink="false">99@http://www.cplusplus.pun.pl</guid>
<description><![CDATA[zad.1. <br />program obliczający średnią 3 liczb a,b,c przy użyciu funkcji srednia<br /><br />zad.1.a. <br />program obliczający średnią 3 liczb a,b,c n-razy.<br /><br />zad.2. <br />Program obliczający i wypisujący średnią 3 liczb: a b c przy użyciu 2 funkcji: suma i srednia<br /><br />zad.3. <br />Program obliczający i wypisujący, w zależności od wartosci zmiennej x :<br />x=1 pole koła<br />x=2 pole prostopadłościanu<br />x=3&nbsp; pole trójkąta<br /><br />zad.4. <br />Program wypisujący maximum z 2 liczb a,b (zawiera funkcję max)<br /><br />zad.5. <br />Program wypisujący maximum z 3 liczb a,b,c (zawiera funkcję max)<br /><br />zad.6. <br />Program wykonujacy w zależności od wczytanej wartości x:<br />x=a funkcja obliczająca i wypisująca sumę n losowych liczb (n&lt;100)<br />x=b funkcja obliczająca i wypisująca ilość parzystych elementów w zakresie od n (n&lt;18) do 1000<br />x=c funkcja obliczająca i wypisująca sumę parzystych elementów w zakresie od n (n&lt;18) do 1000<br />x=d funkcja wypisująca komunikat &quot;Litera d&quot;<br />w pozostałych przypadkach funkcja wyisująca komunikat &quot;Błędne dane&quot;]]></description>
<pubDate>Wtorek 29 Marzec</pubDate>
<comments>Wtorek 29 Marzec</comments>
</item>
<item>
<title>8 marca 2011</title>
<link>http://www.cplusplus.pun.pl/viewtopic.php?pid=92#p92</link>
<guid isPermaLink="false">92@http://www.cplusplus.pun.pl</guid>
<description><![CDATA[/*<br />zad.1.c. <br />Napisz funkcję SUMA wyznaczającą sumę dwóch zadanych liczb całkowitych. Napisz program wykorzystujący funkcję SUMA.<br />*/<br /><br />#include&lt;iostream.h&gt;<br />int suma(int a, int b);<br />//koniec zasięgu zmiennych a i b<br />int main()<br />{<br />int a,b;<br />cout&lt;&lt;&quot;suma 1 = &quot;&lt;&lt;suma(a,b)&lt;&lt;endl;<br />cout&lt;&lt;&quot;suma 2 = &quot;&lt;&lt;suma(a,b)&lt;&lt;endl;<br />cout&lt;&lt;&quot;suma 3 = &quot;&lt;&lt;suma(a,b)&lt;&lt;endl;<br />system(&quot;pause&quot;);<br />}<br /><br />int suma(int a, int b)<br />{<br />int sumaa;<br />cout&lt;&lt;&quot;podaj a i b&quot;&lt;&lt;endl;<br />cin&gt;&gt;a&gt;&gt;b;<br />sumaa=a+b;<br />return sumaa;<br />}]]></description>
<pubDate>PoniedziaĹek 14 Marzec</pubDate>
<comments>PoniedziaĹek 14 Marzec</comments>
</item>
<item>
<title>8 marca 2011</title>
<link>http://www.cplusplus.pun.pl/viewtopic.php?pid=91#p91</link>
<guid isPermaLink="false">91@http://www.cplusplus.pun.pl</guid>
<description><![CDATA[/*<br />zad.1.b. <br />Napisz funkcję SUMA wyznaczającą sumę dwóch zadanych liczb całkowitych. Napisz program wykorzystujący funkcję SUMA.<br />*/<br /><br />#include&lt;iostream.h&gt;<br />int suma(int a, int b)<br />{<br />int sumaa;<br />sumaa=a+b;<br />return sumaa;<br />}<br />//koniec zasięgu zmiennych a i b<br />int main()<br />{<br />int a,b;<br />cout&lt;&lt;&quot;podaj a i b&quot;&lt;&lt;endl;<br />cin&gt;&gt;a&gt;&gt;b;<br />cout&lt;&lt;&quot;suma 1 = &quot;&lt;&lt;suma(a,b)&lt;&lt;endl;<br />cout&lt;&lt;&quot;suma 2 = &quot;&lt;&lt;suma(a,b)&lt;&lt;endl;<br />cout&lt;&lt;&quot;suma 3 = &quot;&lt;&lt;suma(a,b)&lt;&lt;endl;<br />system(&quot;pause&quot;);<br />}]]></description>
<pubDate>PoniedziaĹek 14 Marzec</pubDate>
<comments>PoniedziaĹek 14 Marzec</comments>
</item>
</channel>
</rss>
