Jump to content

C language (Questions)

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
7 replies to this topic

#1
hnaya

hnaya

    Newbie

  • Members
  • Pip
  • 5 posts
any expert programmer can help me

Writ a C program to compute each of the following problems
1. To find the sum of individual digits of a given integer number .
2. To find the sum and average of a given array of integer numbers .
3. To find the GCD and LCD of given two integer numbers .
4. To find the reverse of a given integer number .
5. To find the sum of row elements , column elements and all elements of given 3x3 matrix of non-zero integers .


For each of the above problems follow the standard steps for problem solving and program development.
1. Analyze the problem and develop a precise specification form your understanding of the problem statement. Identify the data requirement like the problem constants, problem input, problem output, program variables, appropriate logic and relevant formulas.
2. Systematically subdivide the process into a collection of distinct steps and develop a clear and precise algorithm for solving the problem.
3. Translate each of the individual steps in our algorithmic solution into C program codes for CodeWarrior IDE.
4. Systematically test or validate your program by running it once for each set of input values that covers the full range allowed by the problems input specification.
5. Neatly document all these relevant steps carried out in the process of developing.

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
Since steps 1 and 2 are not C questions, we will need to see what you've done for those steps first.

Also, we do not do people's homework for them, but if you can explain where you're having issues we'll be glad to help point you in the right direction or debug code.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
Steve.L

Steve.L

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 444 posts
Uhhh, how about you RTFM? These are extremely basic programming examples which should cause no hindrance whatsoever, assuming you read up on the basics of the language. We don't do homework for you.

If you get stuck somewhere along the way, post your code and we'll help you out.

#4
hnaya

hnaya

    Newbie

  • Members
  • Pip
  • 5 posts
hi i answer the questions but i am not sure about it
so could any one chick that answers and confirm that to me
if there is any wrong please solve it

also i have difficult to write algorithm
i did that for question one so any one could help for the others

i Attached word File

Attached Files



#5
Steve.L

Steve.L

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 444 posts
The day a universal translator is coded is the day I jump for joy.

#6
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
Your questions appear (at first glance) to be answered correctly. It should be easy to write pseudo-code from your code.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#7
hnaya

hnaya

    Newbie

  • Members
  • Pip
  • 5 posts
no body to help

#8
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
Just grab the essence of your logic and write it as pseudo-code. You've done the hard part.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog