Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

help urgent- need program in C language to print the picture

Status
Not open for further replies.

aminmahdi

Member level 1
Joined
Sep 11, 2006
Messages
35
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,516
help ergent

hi

i need a program in C language that print this picture:

note: between of every digit must be 3 blank character .

 

Re: help ergent

You may use 3 loops for that and seperate them with spaces. i didnt take care of location but it ll be more simple(study it by yourself)

Exp:

For i=1 to 5
{
for j=0 to (i-1) //
{
print (j+i)
print (' ')
}
for z=2 to i
{
print (2i-z)
print(' ')
}
}

Or reall code pascal:

begin
s:='';
For i:=1 to 5 do
begin
for j:=0 to (i-1) do
begin
s:=s+inttostr(j+i)+' ';
end;

for z:=2 to i do
begin
s:=s+inttostr(2*i-z)+' ';
end;
memo1.Lines.Add(s);
s:='';
end;


Good luck
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top