473,513 Members | 2,478 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

algorithm for printing specific odd numbers

1 New Member
printing odd numbers between one to ninety nine(99)
Nov 18 '15 #1
2 1061
weaknessforcats
9,208 Recognized Expert Moderator Expert
Read up on the % modulus operator.
Nov 18 '15 #2
donbock
2,426 Recognized Expert Top Contributor
The modulus operator provides a way to test if a particular number is even or odd. However, if you know you need to start from 1, and if you're allowed to know that The starting number is guaranteed to be odd, then you need a rule for computing the next odd number from the previous odd number.
Nov 19 '15 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
6497
by: drj0nson | last post by:
Without getting too mathematical : how do you print/handle big numbers? for ( int i = 1 ; i < 10 ; i ++) cout << (123456789 << i) << endl; 246913578 493827156 987654312 1975308624...
5
2182
by: Robert Bralic | last post by:
Dear, I weated a simple program, he is compiled with gcc, and generates prim numbers, with fastes method that I find.He is based on divide with generated prim numbers... At end he gives time...
1
4015
by: lsr.group | last post by:
How can I print the line numbers with the code in C#? I have tried everything and looked in a few books.
16
6741
by: a | last post by:
We are writing an app that assigns people to teams based on their curent score. Teams are 8 people, there are 2 teams. (i would like it to be flexible, but this is a start). I need an algorithm...
6
2204
by: MJ | last post by:
Is it possible to print varying numbers of labels from Access?
5
15850
by: Stone | last post by:
Hello. I need a simple programme to print prime numbers from 1 to 100. I need it urgently.
7
6624
by: Digital Puer | last post by:
Hi, I am interested in catching exceptions and printing the line number and file name of where the exception occurred, like what is done in Java. For example, when vector's at() accesses beyond...
2
2109
by: Garandowner | last post by:
I am writing a program and I can not figure how to get it to list only 5 entries per line with one space in between. I am trying to get the program to count by .379 and list only 5 entries per line....
2
1522
by: anwarbaffa | last post by:
can any body help me that how can i print the list of prime numbers from 1 to 5o by using c. i shall be very thankful to u
0
7260
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
7539
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5686
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
4746
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3234
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3223
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1597
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
456
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.