473,378 Members | 1,507 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,378 software developers and data experts.

NUMERIC CENTER

How can i do a program that makes the numeric center.. this is....

1+2+3+4+5=15 ............ 6= numeric center.... ........7+8= 15.....
of this way 1,2,3,4,5,(6),7,8...
the next is 35 ... (1 a 34) and (36 a 49) the sum of this is: 595
the next program can do that , but it have a mistake and I don`t know
wich is...
While i < n
For i = 1 To numero - 1
sumaA += i
Next
i = numero + 1
While sumaA sumaB
sumaB += i
i += 1
If sumaA = sumaB Then
TextBox1.Text = TextBox1.Text & numero & vbCrLf
End If
End While
numero += 1
sumaA = 0
sumaB = 0
End While
I need it in C++ if you can help .... thanx

May 8 '07 #1
2 1610
ma************@gmail.com wrote:
How can i do a program that makes the numeric center.. this is....

1+2+3+4+5=15 ............ 6= numeric center.... ........7+8= 15.....
of this way 1,2,3,4,5,(6),7,8...
the next is 35 ... (1 a 34) and (36 a 49) the sum of this is: 595
the next program can do that , but it have a mistake and I don`t know
wich is...

[vb code redacted]
You may find your answer at
http://www.parashift.com/c++-faq-lit...t.html#faq-5.2
May 8 '07 #2
<ma************@gmail.comwrote in message
news:11*********************@l77g2000hsb.googlegro ups.com...
How can i do a program that makes the numeric center.. this is....

1+2+3+4+5=15 ............ 6= numeric center.... ........7+8= 15.....
of this way 1,2,3,4,5,(6),7,8...
the next is 35 ... (1 a 34) and (36 a 49) the sum of this is: 595
the next program can do that , but it have a mistake and I don`t know
wich is...
While i < n
For i = 1 To numero - 1
sumaA += i
Next
i = numero + 1
While sumaA sumaB
sumaB += i
i += 1
If sumaA = sumaB Then
TextBox1.Text = TextBox1.Text & numero & vbCrLf
End If
End While
numero += 1
sumaA = 0
sumaB = 0
End While
I need it in C++ if you can help .... thanx
This sounds exactly like homework. We will not do your homework for you.
We will help you, however, when you get stuck, but you haven't gotten stuck
yet becuase you haven't done anything. If we do your homework for you, you
don't learn anything, except how not to program

Try it yourself first. Read the textbook the teacher gave you/had you buy.
May 9 '07 #3

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

Similar topics

0
by: Travis Oliphant | last post by:
Numarray is making great progress and is quite usable for many purposes. An idea that was championed by some is that the Numeric code base would stay static and be replaced entirely by Numarray. ...
2
by: Johannes Nix |Johannes.Nix | last post by:
Hi, I have a tricky problem with Numeric. Some time ago, I have generated a huge and complex data structure, and stored it using the cPickle module. Now I want to evaluate it quickly again on a...
4
by: Gezeala 'Eyah' Bacu\361o II | last post by:
hey guys..need your help on this.. i have a plpgsql function where in i compute numeric values for my php scripts.. my problem is my function just won't round some numbers properly.. what i...
7
by: Raj | last post by:
Hi I was hoping someone could suggest a simple way of stripping non-numeric data from a string of numbers. For example, if I have "ADB12458789\n" I would like to remove the letters and the...
10
by: cybernerdsx2 | last post by:
Hi, I would like to use regex.h to search for a pattern like the following: "v1.2.54" how can I achieve that?
7
by: Sheldon | last post by:
Hi, I have the following loop that I think can be written to run faster in Numeric. I am currently using Numeric. range_va = main.xsize= 600 main.ysize= 600 #msgva is an (600x600) Numeric...
0
by: robert | last post by:
just a note - some speed comparisons : 0.60627370238398726 0.42836673376223189 0.36965815487747022 0.016557970357098384 0.15692469294117473 0.01951756438393204
13
by: nishit.gupta | last post by:
Is their any fuction available in C++ that can determine that a string contains a numeric value. The value cabn be in hex, int, float. i.e. "1256" , "123.566" , "0xffff" Thnx
9
by: Ken Fine | last post by:
Hi there, I have written a simple function that attempts to set the angle of objects so as to place them in aesthetically appealing ways. The code follows; there is some stupidness in it (e.g. a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?

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.