I can help you with that, but what kind of program do you want?
|
hi there!
need help i need a simple c++ program with a function or subprogram on it... if meron kau.. plz pahingi copy ng codes.. kahit simple lang... i should be programming one kaso wala pa me compiler and im so busy eh... plz lang po...
I can help you with that, but what kind of program do you want?
kuya.. any c++ program that contains a function or a subprogram on it... pwde email nlng po at [email protected]
justme., daghan ko ana. but ako pang hilngon sa kaban..
btw try to use Google
type
"c++ + function subprogram"
ok, kuya thnx... im trying to program na man... but if meron po kau... maybe it'l help... thnx talagaOriginally Posted by jalmz
![]()
Here you go, its a simple cpp program that adds two numbers using function.
Code:#include<iostream.h> #include<conio.h> //This header file is the library of clrscr() & getch() int num1, num2, sum; // global declaration void add (void); // function declaration void main() { clrscr(); // clears the user screen cout << "This is a sample program that adds to numbers" << endl; add(); // A Function call getch(); // Waits for a keyboard hit before exiting the program } void add(void) { cout << "\nEnter the 1st number: "; cin >> num1; cout << "\nEnter the 2nd number: "; cin >> num2; sum = num1 + num2; // adds the two numbers cout << "\nThe sum of the two numbers is " <<sum << endl; cout << "\nPress any key to exit..."; }
kuya, thnks...
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |