August 2018 1 16 Report
PILNE!! potrzebuję, żeby ktoś mi napisał ten program (pascal) w języku c++:

Program algorytm_rosyjskich_wiesniakow;
Uses crt;
var a, b, s:longint;
begin
ClrScr;
Write('Podaj pierwsza liczbe: '); Readln(a);
Write('Podaj druga liczbe: '); Readln(b);
s:=0;
repeat
if a mod 2 = 1 then s:=s+b;
a:=a div 2;
b:=b*2;
until a=0;
Write('Iloczyn = ',s );
ReadKey;
end.




Recommend Questions



Life Enjoy

" Life is not a problem to be solved but a reality to be experienced! "

Get in touch

Social

© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.