View Full Version : pl help me with this program
ashwin9390@gmail.com
December 30th, 2011, 02:43 PM
Write a c program to execute function such as sum,product,difference and division according to user requirement without using control structure??
hakermania
December 30th, 2011, 02:44 PM
Sample code?
What have you tried so far?
I don't want to be offensive, but this looks too much like a homework?
MG&TL
December 30th, 2011, 02:48 PM
Well, you could pass arguments to the program, like with the command cp requires two arguments like this:
cp thisfile thisplace
so something like:
#include <stdlib.h>
main(int argc, char *argv[]) {
do stuff with the argv[]s
sum them and stuff.
}
Intentionally vague, this looks like homework. :)
Paqman
December 30th, 2011, 02:50 PM
I don't want to be offensive, but this looks too much like a homework?
Blatantly.
matt_symes
December 30th, 2011, 02:55 PM
Definitely homework !
We are not here to do your homework for you. You will learn nothing from it. Go and speak to your tutor if you need help. As an absolute minimum, have a stab at it and post what you have tried !
It is also against the CoC, that you signed to post in these forums, to post homework question threads.
coffeecat
December 30th, 2011, 03:05 PM
Thread closed.
@OP, please take note of the forum Code of Conduct (http://ubuntuforums.org/index.php?page=policy) to which you agreed when you created your forum account. In particular:
The Ubuntu Forums is not a homework service. Please do not post your homework assignments expecting someone else to do it for you.
Powered by vBulletin® Version 4.2.2 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.