tempat BERJUANG
About Me
- arista WHIE
- hai.. welcome to my blog... namaku wiwik.. Asli BALI.. aku kuliah di ITS jurusan STATISTIKA.. NRP 1311100020.. silahkan menikmati blogku.. see it n' enjoy it... semoga bermanfaat... kalau ad kurang g usah sungkan kasi komentar ya..
Diberdayakan oleh Blogger.
Pengikut
Selasa, 13 Desember 2011
penjumlahan angka ganjil
program penjumlahan_angka ganjil;
uses wincrt;
var i,j,n,sum :integer;
begin
readln (n);
begin
if n=1 then write ('1') else
if n>1 then
begin
for i:=n downto 2 do
begin
sum:=1;
j:=(2*i-1);
write (j,'+');
sum:=sum+j;
end;
writeln (1,'=',sum);
end;
end;
end.
uses wincrt;
var i,j,n,sum :integer;
begin
readln (n);
begin
if n=1 then write ('1') else
if n>1 then
begin
for i:=n downto 2 do
begin
sum:=1;
j:=(2*i-1);
write (j,'+');
sum:=sum+j;
end;
writeln (1,'=',sum);
end;
end;
end.
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar