473,405 Members | 2,379 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

C# beginner

(Type your message here)

--------------------------------
From: lovey dovey

Hi there,
I am fairly new to C# programming and i am trying out some exercises.Can anyone help me with the code that takes an odd integer input and writes a diamond of that number on the screen with that many rows. For example, if 5
is entered, the output will show like this:
5
5 5
5 5 5 and if 3,it should b like 3
5 5 3 3
5 3
The program should perform the same thing if any symbol is input,
e.g"*". In that case it should ask the user the no: of lines to print and it should print a diamond of that character with the specified number of lines.
Thanx a ton in advance.

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>dX/6AA6faE2bw0WXVY+7/w==</Id>
Nov 18 '05 #1
3 1056
This sounds like a homework to me :)
Is it homework?
"lovey dovey via .NET 247" <an*******@dotnet247.com> wrote in message
news:ue**************@TK2MSFTNGP10.phx.gbl...
(Type your message here)

--------------------------------
From: lovey dovey

Hi there,
I am fairly new to C# programming and i am trying out some exercises.Can anyone help me with the code that takes an odd integer input and writes a
diamond of that number on the screen with that many rows. For example, if 5 is entered, the output will show like this:
5
5 5
5 5 5 and if 3,it should b like 3
5 5 3 3
5 3
The program should perform the same thing if any symbol is input,
e.g"*". In that case it should ask the user the no: of lines to print and it should print a diamond of that character with the specified number of
lines. Thanx a ton in advance.

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>dX/6AA6faE2bw0WXVY+7/w==</Id>

Nov 18 '05 #2
Hello lovey dovey via .NET 247,

I'd be glad to *help* you. I'm not going to do it for you though, so why dont you post what you have so far? And ask questions about particular items you need help with?

(Type your message here)

--------------------------------
From: lovey dovey
Hi there,
I am fairly new to C# programming and i am trying out some
exercises.Can anyone help me with the code that takes an odd integer
input and writes a diamond of that number on the screen with that many
rows. For example, if 5
is entered, the output will show like this:
5
5 5
5 5 5 and if 3,it should b like 3
5 5 3 3
5 3
The program should perform the same thing if any symbol is input,
e.g"*". In that case it should ask the user the no: of lines to print
and it should print a diamond of that character with the specified
number of lines.

Thanx a ton in advance.

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>dX/6AA6faE2bw0WXVY+7/w==</Id>

--

--
Matt Berther
http://www.mattberther.com
Nov 18 '05 #3
I recommend Deitel Developer Series, "C# A Programmer's Introduction"
that will teach you to use the language. You should also consider
"Simply C#: An Application-Driven Tutorial Approach"

SEE: http://www.deitel.com/
--
<%= Clinton Gallagher
A/E/C Consulting, Web Design, e-Commerce Software Development
Wauwatosa, Milwaukee County, Wisconsin USA
NET cs*********@REMOVETHISTEXTmetromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/


"lovey dovey via .NET 247" <an*******@dotnet247.com> wrote in message
news:ue**************@TK2MSFTNGP10.phx.gbl...
(Type your message here)

--------------------------------
From: lovey dovey

Hi there,
I am fairly new to C# programming and i am trying out some exercises.Can anyone help me with the code that takes an odd integer
input and writes a diamond of that number on the screen with that many
rows. For example, if 5 is entered, the output will show like this:
5
5 5
5 5 5 and if 3,it should b like 3
5 5 3 3
5 3
The program should perform the same thing if any symbol is input,
e.g"*". In that case it should ask the user the no: of lines to print and it should print a diamond of that character with the specified
number of lines. Thanx a ton in advance.

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>dX/6AA6faE2bw0WXVY+7/w==</Id>

Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Richard B. Kreckel | last post by:
Hi! I was recently asked what book to recommend for a beginner in C++. I am convinced that you needn't study C in depth before learning C++ (though it helps), but cannot find any beginner's...
8
by: Grrrbau | last post by:
I'm a beginner. I'm looking for a good C++ book. Someone told me about Lafore's "Object-Oriented Programming in C++". What do you think? Grrrbau
7
by: Rensjuh | last post by:
Hello, does someone have / know a good C++ tutorial for beginnners? I would prefer Dutch, but English is also fine. Hoi, heeft / kent iemand nog een goede C++ tutorial voor beginners? Het liefste...
27
by: MHoffman | last post by:
I am just learning to program, and hoping someone can help me with the following: for a simple calculator, a string is entered into a text box ... how do I prevent the user from entering a text...
18
by: mitchellpal | last post by:
Hi guys, am learning c as a beginner language and am finding it rough especially with pointers and data files. What do you think, am i being too pessimistic or thats how it happens for a beginner?...
20
by: weight gain 2000 | last post by:
Hello all! I'm looking for a very good book for an absolute beginner on VB.net or VB 2005 with emphasis on databases. What would you reccommend? Thanks!
5
by: macca | last post by:
Hi, I'm looking for a good book on PHP design patterns for a OOP beginner - Reccommendations please? Thanks Paul
10
by: Roman Zeilinger | last post by:
Hi I have a beginner question concerning fscanf. First I had a text file which just contained some hex numbers: 0C100012 0C100012 ....
10
by: hamza612 | last post by:
I want to start learning how to program. But I dont know where to start. From what I've heard so far c++ is not a good lang. to learn as a beginner because its very complicated compared to others...
22
by: ddg_linux | last post by:
I have been reading about and doing a lot of php code examples from books but now I find myself wanting to do something practical with some of the skills that I have learned. I am a beginner php...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.