Click here to Skip to main content
15,918,168 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
how to print with c#

ABCDE
ABCD
ABC
AB
A
Posted
Comments
Shubham Vijay 15-Nov-11 1:58am    
abcde
abcd
abc
ab
a


also get soution
Sergey Alexandrovich Kryukov 15-Nov-11 2:01am    
Homework? What did you try? Why do you think this is a problem for you?
--SA

glad to see you have tried. check the following code

C#
for (int i=1;i<=5;i++)
{
     for(int j=1;j<=i;j++)
       console.writeline(Convert.ToChar( j + 64 ));
}
 
Share this answer
 
I think this is Homework ? given by school.
Have you Gooooled, have you tried something? If you want to be a good developer you need to try yourself.
If it is not resolved after many attempts then come to us.

leave this habbit of spoon feeding. "Try Try but don't cry"

Please post your tried code.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 15-Nov-11 2:19am    
My deserved 5 for the answer deserved by OP. :-)
--SA
koolprasad2003 15-Nov-11 2:24am    
Thanks
Shubham Vijay 15-Nov-11 2:56am    
112
123
1234
12345


for (int i=1;i<=5;i++)
{
for(int j=1;j<=i;j++)
}
console.writeline(""+j);
}
}

but i have print alphabets, and using c m print using "64+j" but i can't print in c#.

i hope .. u r understand for me.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900