Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

[SOLVED] C - multiple array with another array

c array

  • Please log in to reply
3 replies to this topic

#1 equation

equation

    CC Regular

  • Member
  • PipPipPip
  • 27 posts
  • Programming Language:C, Java, PHP
  • Learning:C, Java

Posted 20 September 2012 - 01:34 AM

This code prints the 7 digits that storred into number[i]
If the input is 1234567

for (i = 1; i <= 7; i++) {
printf("%d", number[i]);
}
If i want to see the position number[1], how can i do that? The position number[1] is the digit 2 from my input.
My problem is that i have another array, digits[7]={7,6,5,4,3,2,1}, how can i multiply the digits[] with number[]?

digits[0]*number[0] does not work.
  • 0

#2 equation

equation

    CC Regular

  • Member
  • PipPipPip
  • 27 posts
  • Programming Language:C, Java, PHP
  • Learning:C, Java

Posted 20 September 2012 - 02:45 AM

OK, people i did it. Don't need help for this question anymore. :)
  • 0

#3 dargueta

dargueta

    I chown trolls.

  • Moderator
  • 4854 posts
  • Programming Language:C, Java, C++, PHP, Python, JavaScript, Perl, Assembly, Bash, Others
  • Learning:Objective-C

Posted 20 September 2012 - 07:23 PM

This topic has been marked as SOLVED. If you have a similar question or topic, you can go back to the subforum and start a new topic to continue discussions.
  • 0

sudo rm -rf / && echo $'Sanitize your inputs!'


#4 preetisoft2

preetisoft2

    CC Regular

  • Member
  • PipPipPip
  • 26 posts
  • Programming Language:C, Java, C++
  • Learning:PHP

Posted 08 October 2012 - 02:08 AM

Thanks for this.
you have already done it.
  • -1





Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download