C programming question


 
Thread Tools Search this Thread
Top Forums Programming C programming question
# 1  
Old 04-05-2009
Bug C programming question

How do I find multiples of a number in C programming?
Thanks
# 2  
Old 04-05-2009
Quote:
Originally Posted by Aseda
How do I find multiples of a number in C programming?
Thanks
1.) Be more specific on what you mean.

2.) Show us an example of what you have so far.

3.) This sounds suspiciously like homework. The UNIX and Linux Forums - Forum Rules - Rule #6
# 3  
Old 04-05-2009
Thanks, Glen. No. It's not homework. I'm trying to learn the language but I'm not in school.

There is a product table which I'm trying to reproduce in C. The same table children use to learn multiplication. Eg. 1*1 gives you 1, 2*2 gives you 4.

1 1 2 3 4 5
2 2 4 6 8 10
3 3 6 9 12 15
4 4 8 12 16

I would like to write a C program to return a table like this.

Thanks in advance
Aseda
# 4  
Old 04-05-2009
You want to do iterations [1]. The referenced link is a shell script, not C (primarily because you haven't shown what code you have yet).

If you don't show that you have made some effort to solve the problem, it is often interpreted as a "can you do this for me?" question. Which, again, sounds like homework.


[1] https://www.unix.com/shell-programmin...ting-loop.html
# 5  
Old 04-05-2009
Thanks, Glen.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

More a logic than a programming question

hello, I'm a littlebit lost... i have a table of single names and combination of two names and i want a table of ALL single names with ALL combinations (also the indirect ones). - - - in reality the names are longer, not only a,b,.. and the table is tab-delimited, and the result table... (6 Replies)
Discussion started by: dietmar13
6 Replies

2. Shell Programming and Scripting

Plz Help Me in This question in Shell Programming

2- Write a bash shell script filestatic. The script should examine the number files in directories given as arguments (parameters) to this script. a. if one argument is given, the script should count and report the number of files in this directory. Only regular files should be counted, not... (1 Reply)
Discussion started by: tahseen_22334
1 Replies

3. Shell Programming and Scripting

Beginner Shell Programming Question

Hello all, I am currently try to learn the linux operating system as well as some bash programming. I have come across some online course work which has been very helpful, I have been working through some assignments and since I have no teacher to ask I have come to you experts. So the... (6 Replies)
Discussion started by: g2axiom
6 Replies

4. UNIX for Dummies Questions & Answers

General Programming Question

Experience level : New to programming in Linux. Forgive my noobiness in this context with regards to programming, language or grammar. Some Background info : I have seen a lot of programs which I use (Modo and Maya especially) which can use a command line to run the different parts of the... (2 Replies)
Discussion started by: snd321
2 Replies

5. UNIX for Dummies Questions & Answers

Programming question

How do I create a program that will allow a user to type in a number, while the program outputs that number in words. For example, if a user types in 21, the computer would respond with twenty-one. Please allow the program to work for 0-30. How do I let the user know if a number typed in is not in... (2 Replies)
Discussion started by: lexydoll87
2 Replies

6. Shell Programming and Scripting

question about about Shell programming

1.if 2.then 3. # save the number of args and first argument in variables. 4. num_args=$# 5. id="$1" 6. echo "$id" 7. #echo "$1" > crapfile.txt 8. echo `sed 's/\*/'\*'/g' < crapfile.txt` Above is a partial code.I would like to ask: at line 1:... (1 Reply)
Discussion started by: thungmail
1 Replies

7. UNIX for Dummies Questions & Answers

programming question... sorta

i didnt wanna post this in C/C++ or Shell programming, because its neither... closest would be Shell... but anywayz, what would (in your opinion) be the easiest route in creating shell gui's?.... im not talking about XFree86 objects, but rather... like the shell setup screen, the cheezy blue popup... (2 Replies)
Discussion started by: 01000101
2 Replies

8. Programming

programming question from a newbie, please help

Hi Everyone, I really hope I could get some insight from a few of you, I've been searching the net for various resources, and this board seems to be the friendliest and most helpful by far. I work for a medical research company and we use sun 4 and we have different studies that have their... (1 Reply)
Discussion started by: milenky
1 Replies

9. Shell Programming and Scripting

Question about Shell Programming

First, I'd like to know if being a shell programmer considered a "real" programmer. is it?? also, I do create a lot of shell programs which includes full scripts to create users and maintaining records. ie phone records. now, I hear the programmer has to do some cleaning up after the... (3 Replies)
Discussion started by: IMPORTANT
3 Replies
Login or Register to Ask a Question