DIGIT-ARC read-only archive · snapshot: July 23, 2026

Help me please !!!

43 posts · originally from https://geek.digit.in/community/threads/help-me-please.67134/

A
axe_effect Original post #1
Sep 2, 2007 at 4:48 PM
Hello friends
This is my first post and i am asking for ur help, i am student of b.sc (food science) last year...
Tommorow i have to submit an assigment on C.... in last sem we have to read C too but dont know anything about it....
I need your HELP .... To make my assingment coz u all are genius here and its a cup of tea for u all to make it...

I have to make some programs on c which are as follow....
kindly help me in making my assingnment.... I will be greatful

List of programs:
  • write a program to find whether the given alphabet is vowel or consonant.
  • write a program to fing whether the given no. is odd or even.
  • write a program to display and calculate factorial of given no. in each step.
  • write a program to build pyramid of a star.
  • write a program to build pyramid of natural no.
  • write a program to build pascal triangle.
  • to calculate surface tention from molecular wt and density of liquids.
  • write a program to display the % of 3 subjects and declare their division with pass or fail by using if else ladder.
please please please help me
Pathik
Pathik #2
Sep 2, 2007 at 5:08 PM
dude the programs u have listed above are veryyy easy...
try doing them urself..
A
axe_effect #3
Sep 2, 2007 at 5:22 PM
Thanks pathik
I know its for u guys but for me its like to climb on mount everest...
we just read 1 week C and our faculty wants these programs from us
friend its my sincere request if possible please post them....
we are a student of food science why they are forcing to learn c :(
please help me ... its very easy for u guys .... may b u can do it in minute
entrana
entrana #4
Sep 2, 2007 at 5:37 PM
Edit Deleted Ignore This Post This Is Hazardous To C Programming
A
axe_effect #5
Sep 2, 2007 at 5:52 PM
sorry...but is this anyhow related to c programming?
zyberboy
Sep 2, 2007 at 5:59 PM
^^ROLF........this is really funny man "entrana" accidentally posted a solution for another thread here...oh man i am gone die here
A
axe_effect #7
Sep 2, 2007 at 6:00 PM
yeah....even i think so...but this doesnt solves my problem..i m still between the deep blue sea and the ocean...plz help me out..
gary4gar
Sep 2, 2007 at 6:04 PM
@axe_effect
Do you want Spoonfeeding like a baby:x

come'on, tell us where you struck. the programs are meants for your pratice if we did this all what will you do?

who will you learn?
so do this on your own, if you are stuck then post back with specific problem
A
axe_effect #9
Sep 2, 2007 at 6:11 PM
the main point where i m stuck is i m a computer illiterate...if i would have had even slightest knowledge of how this damn C programming is done...i wouldnt hv posted it here...
entrana
entrana #10
Sep 2, 2007 at 8:35 PM
o my goodness where the F have i posted god dammit the mods are gonnna ban me now better delete tjhis
M
mehulved #11
Sep 2, 2007 at 8:37 PM
axe_effect said:
sorry...but is this anyhow related to c programming?
sorry...but is this thread anyhow related to Open Source?
And the problems are really basic ones. They aren't testing your C programming skills but rather they are the ones testing your logic, IMHO.
ilugd
ilugd #12
Sep 2, 2007 at 9:05 PM
hey dudes, it isn't fair. This guy himself accepts that he is computer illiterate. The least we can do is point him to some links that have the solutions. Is it ok or is it disallowed.
@axeeffect, how come you have c in your course? You still need the solution right?
Garbage
Garbage #13
Sep 2, 2007 at 9:24 PM
Solution for check for ODD or Even...

Code:
# include <stdio.h>

int main()
{
    int no;
    printf ("\nEnter a number : ");
     scanf ("%d",&no);
    
    if (no%2==0)
        printf ("\nGiven number is Even.");
    else
        printf ("\nGiven number is Odd.");
    
    return 0;
}
I'm giving simple programs!

But plz try to learn yourself !

====================================================

to find whether the given alphabet is vowel or consonant.

Code:
# include <stdio.h>

int main()
{
    char ch;
    printf ("\nEnter an alphabate : ");
     scanf ("%c",&ch);
    
    if (ch=='a'||ch=='e'||ch=='i'||ch=='o'||ch=='u'||)
        printf ("\nGiven alphabate is Vowel.");
    else
        printf ("\nGiven alphabate is consonent.");
    
    return 0;
}
NOTE : I've NOT compiled them. Check urself plz
A
axe_effect #14
Sep 2, 2007 at 9:28 PM
its correct i still need the solutions...i m tryin my level best...and i myself am surprised of relevance of higher mathematics and programming language to our course...

we even have higher maths inspite of the fact tht we all belong to bio backgrounds and all of us had only BASIC as computer language in school level...

we r students of applied chem n food tech..and other big fact is tht girls arent TECHIE as guys are...

thx shirish...

i m tryin to build these programs on my own...i hv made a few even..i ll post these in some time..if there be any corrections u can tell me...
Garbage
Garbage #15
Sep 2, 2007 at 9:30 PM
absolutely axe_effect !!
If I can understand, then I can suggest some corrections !!
ilugd
ilugd #16
Sep 2, 2007 at 9:32 PM
LOL, just wondering. Do your teachers know enough c to correct that?
A
axe_effect #17
Sep 2, 2007 at 9:33 PM
@ ilgud

well thts d main problem...our teacher is on d same level as we are...she is a passout of our stream only...she also has studied c for just 3 months..
ilugd
ilugd #18
Sep 2, 2007 at 9:39 PM
dont worry then. You really don't need to check that it compiles. She probably wouldn't know the difference between c and c++ anyway.
And why would that be a problem. I like to pull the legs of incompetent teachers where I study. They are fun actually. Just nod seriously to whatever crap they are spewing and they will think you are a good student. :)
Pathik
Pathik #19
Sep 2, 2007 at 9:51 PM
R u under MU?? Only MU can include C in food science..
A
axe_effect #20
Sep 2, 2007 at 10:35 PM
void main()
{
for I=1
int percent, marks;
scanf marks;
percent=(marks/100)*100;
printf( “the percentage is %f”,& percent);

if (percent>79)
grade=”hons”;
else if (percent>59)
grade=”first divison”;
else if(percent>49)
grade=”second divison”;
else if(percent>39)
grade=”third divison”;
else grade=”fail”

printf(“%s\n”,grade);

next I;

getch();

}
@ pathik


MU?...
i didnt get u..:confused:

hey frndz i hv made this program of pascal triangle plz go through it..

#include stdio.h
#include conio.h
void main()
{
int a[10][10];
int i,j,c,n;
clrscr();
printf("Enter how many lines do you want");
scanf("%d",&n);
a[1][1]=1;
printf("%5d",a[1][1]);
a[2][1]=1;
a[2][2]=2;
a[2][3]=1;
printf("%d %d %d",a[2][1],a[2][2],a[2][3]);
for(i=3;i<=n;i++)
{
a[1]=1;
printf("%d",a[1]);
j=2;
c=3;
while(j<=i)
{
a[j]=a[i-1][c-1]+a[i-1][c-2];
printf("%5d",a[j]);
c=c+1;
j=j+1;
}
a[j]=1;
printf("%d",a[j]);
}
}
QwertyManiac
Sep 2, 2007 at 11:06 PM
Your problems are so common that a simple Google query would throw up the answers right on top. Do it the clever way ;)
A
axe_effect #22
Sep 2, 2007 at 11:17 PM
can u provide me with some of those googling tips coz i get irrelevant links more than those which are of really great help...i tried wid advanced search but no use...can u plz enlighten me wid ur knowledge...
ilugd
ilugd #23
Sep 2, 2007 at 11:38 PM
christ... I feel like God already, axe effect, will you stop buttering us up?
Calling us all geniuses and now asking for enlightenment. :-D
ROFL.
Anyway.. here is a link and how to go about it
*www.google.co.in/search?hl=en&safe...+number+is+a+prime+number+c&btnG=Search&meta=
selected link : *www.google.co.in/url?sa=t&ct=res&c...nrD8Bkpkdp3BX4gkw&sig2=gF09rC0WdkFDtGSw5UNdXw

just try to do the search with the main phrase
eg to search for a program to find prime numbers you could use a phrase you think another person would use when explaining the program. Say "program to find if a number is prime" Then just append c or c language to the end.
Some of the programs might need some more research.
QwertyManiac
Sep 2, 2007 at 11:44 PM
Yep, simple keywords which are minimal are the key to good results. Like:
Code:
pascal triangle c
Or a bit cleverly:
Code:
pascal triangle "stdio"
For forcing C-only results.
A
axe_effect #25
Sep 2, 2007 at 11:56 PM
@ ilugd

hey i m not flattering u...i m not tht TECHIE sort ...i hv very basic knowledge abt computers...i was googlin for these c programs n came across this think digit forum dunno frm where...so i decided to join it..

n seriously pals i aint jokin..i m really a computer illilerate..even i dun hang up late nights on computer...its juz coz this assignment i m here...

thx qm...i ll keep it in mind now..
ilugd
ilugd #26
Sep 3, 2007 at 12:20 AM
hey, take it easy. Just friendly chitchat. But we are no geniuses, we are just good at what we do. And on a relative scale we are definitely not even experts. Well most of us anyway. There are some geniuses around. :)
Hope you assignments got solved.
A
axe_effect #27
Sep 3, 2007 at 12:26 AM
i think quite similar to you...i ll edit tht...its for this is kept this nick axe_effect...:D i ll delete this...
N
Nav11aug #28
Sep 3, 2007 at 3:41 AM
wnt compile ob.. look at the line a[1] .. isnt 'a' a double dimensional array
gary4gar
gary4gar #29
Sep 3, 2007 at 2:22 PM
@axe_effect
try getting any text book for C
you will find Most programs there


[edit]
You can get any of them:-
Let us ''C'' - Yashwant Kanetkar
Programming in ANSI C - E Balagurusamy
The C Programming Language -Brian Kernighan and Dennis Ritchie
praka123
praka123 #30
Sep 3, 2007 at 2:35 PM
C for Dummies?2nd edition?
N
Nav11aug #31
Sep 3, 2007 at 2:54 PM
gary4gar said:
The C Programming Language -Brian Kernighan and Dennis Ritchie

this is one seriously good book
piyush gupta
Sep 3, 2007 at 3:40 PM
^^i thinks Let US C by YPK is better book for a newbie
M
mehulved #33
Sep 3, 2007 at 4:03 PM
piyush gupta said:
^^i thinks Let US C by YPK is better book for a newbie
Dunno about others but I find it the other way around. Little that I've read of both the books I found KnR better though it requires one to take a bit more effort at first. Then again, each one will have their own opinions to this.
piyush gupta
Sep 3, 2007 at 4:18 PM
mehul i was saying...

if u wanna learn C by examples and simple programs and u now a little about computers go to let us C

and for exams and C theory go for Ansi C by balaguruswamy

and for technical C go for
The C Programming Language -Brian Kernighan and Dennis Ritchie

After finish all these books read

Tet your c skills by YPK
Garbage
Garbage #35
Sep 3, 2007 at 6:40 PM
^^ +1

Let us C from Yashvant Kanetkar is very nice for a newbie !!
N
Nav11aug #36
Sep 4, 2007 at 2:52 AM
+1
~Lil JinX~
Sep 4, 2007 at 12:06 PM
Something ain't right here. You say your teacher is "incompetent" (which I highly doubt. No college/university is going to hire teachers with little knowledge of what they're to teach. 3 months of C? Thats more than enough to learn the basic syntax. What you REALLY need as a programmer is a good sense of logic)

You are learning C in class, right? So you should be having some sort of reference material. What I can see here is someone too lazy to bother to learn, and someone who is trying to get it the easy way. Geez, instead of waiting for replies here, you could have gone through any notes/references that you have and figure them out. If you don't have any, try this:

*www.cprogramming.com/tutorial.html


Sorry, I'm not really going to help with this, since its downright cheating. I don't think that anyone else should be writing these programs either. If you want, giving some hints and pointing her in the right direction is a better way to go about this.
Pathik
Pathik #38
Sep 4, 2007 at 12:16 PM
^^ w3schools is for web programming not c/c++ etc..
Unless u consider that c and php use the same logic in simple programs..
~Lil JinX~
Sep 4, 2007 at 12:24 PM
Thanks, edited the link >_< My net really is pathetic. I thought w3schools had programming tutorials as well.
ilugd
ilugd #40
Sep 4, 2007 at 12:38 PM
axe_effect, you really need to listen to lil jinx. You just ran out of excuses. If youknow what I mean.
vish786
vish786 #41
Sep 4, 2007 at 4:24 PM
@thread starter, all this programs r given in basic text book(like ansi c, let us c,etc), and even u can easily right it, read few pages then things will be simple to u.
A
axe_effect #42
Sep 7, 2007 at 9:59 PM
hey every1...thnx a lot..

i m online after almost a week..so i would like to say that yeah we do hava a teacher who has got a bio background and is teaching us maths of +2 level.. and also she is the one who is teaching us computers...she is a passout of our own stream..we have c n maths in one sem only...


secondly i m referrin to p. bala gurusamy n its coz of tht i completed my assignment on time..( i got 3 programs from here...rest i made it on my own)..

but thx every1.. i m really thankful..
QwertyManiac
Sep 7, 2007 at 10:16 PM
Balagurusamy is fairly good with his examples, didn't know that the ex-vice chairman of Anna was so popular .. :)