Grn Xtrm 84 Posting Pro in Training

I wish I didn't, it's frustrating when you know you should be teaching the teacher how to program.

It's really great how someone as young as yourself has been able to become such a skilled programmer. I should have tried to learn while I was younger as well. Only thing is I didn't decide on taking up computer science until I was a senior in high school. Before that I was going to be an english major :zzz:
I'm so glad I decided in favor of comp sci.

Grn Xtrm 84 Posting Pro in Training

You've posted the same question 3 times and haven't showed an ounce of work. Give it a shot and let us know what you think you should do. No one in this community is just going to give you a full program. If you work hard and believe in yourself, you can accomplish anything. Now go do some work. :)

Grn Xtrm 84 Posting Pro in Training

I had Python in high school, it is a nice language for beginners.

I wish I had a programming class in high school.
I was so unprepared for college programming. :(
But I guess I picked it up pretty quickly. :)

Grn Xtrm 84 Posting Pro in Training

like to know more about IronPython that feeds into C#.

First of all, That's what she said. :)
But seriously, I'd like to know more about python. I touched on it very breifly in my first semester of college but never came back to it. The class was an intro to programming class, so pretty much all we did was learn about loops and other very basic stuff. :D

Grn Xtrm 84 Posting Pro in Training

When using a vending machine you insert your currency into slots in the machine. Then you select the desired item using buttons on the machine. In return you will recieve the desired item and change if you overpaid for the item. :)


In case you can't tell I have no idea what your actual question is. ;)
Just thought I'd go off on a little tangent to portray my cynicism towards those who ask strange questions on this site.

Grn Xtrm 84 Posting Pro in Training

lines 23 and 28

I think Ancient Dragon meant to say lines 23 and 27. :)
Don't put semicolons after if and else.

Ancient Dragon commented: Yes I did :) +36
Grn Xtrm 84 Posting Pro in Training

Hello friends. I'm very new to C and am still learning how to do basic stuff. I got the code to work in C++ (which I'm much more fluent in) but I'm having trouble converting it to C code.

#include <iostream>
using namespace std;
double factorial( int n);
int main()
{
    cout<<"N          Factorial"<<endl;
    cout<<"--------------------"<<endl;
for(int i = 15; i>0; --i)
{
        cout<<i<<"          "<<factorial(i)<<endl;
}
char wait;
cout<<"enter";
cin>>wait;
return 0;
}

 double factorial( int n)      
{                                       
   double result = 1.0;
   for(  int i = 2; i <= n; ++i)
   result *= i;
   return result;
}

This is what I have for C:

#include <stdio.h>
#include <time.h>
#include <math.h>
double factorial (int num);
int main()
{
 printf("N          Factorial");
 printf("\n");
 printf("--------------------");
 printf("\n");
 int i;
for(i = 15; i>0; --i)
{
        printf("N %2.2f, factorial %2.2f \n" ,i,factorial(i));
        printf("\n");
}
char wait;
printf("Enter to exit");
scanf(&wait);

return(0);
}

 double factorial( int n)      
{                                       
   double result = 1.0;
   int i;
   for(  i = 2; i <= n; ++i)
   result *= i;
   return result;
}

This C code is not working properly. Can someone give me some ideas on how to resolve this. The problem is not with the factorial but more about style and format. I want the C program to have the same style as the C++ program.
Thanks for the help.

Grn Xtrm 84 Posting Pro in Training

Hey guys, I need your help with a very important matter. I'm starting a band with some of my friends from high school and we are odds in selecting a name for the band. My friend Ed wants the name to be Chicken N' Lamb (don't ask) while my brother Pete wants the name to be MILK( acronym for My Intelligence lacks knowledge ---- this was before the Sean Penn movie was released). If the esteemed members of DaniWeb could provide me with some unique and interesting band names I would be forever grateful. Thanks.

ahihihi... commented: MILK?.. nice meaning :twisted: +1
Grn Xtrm 84 Posting Pro in Training

Aces High by Iron Maiden. I almost got the bass line down perfectly.

Ezzaral commented: Excellent song! +21