+ 1
How to use this code
#include <iostream.h> #include <conio.h> #include <stdio.h> int bintangatas (int bil); int bintangbawah (int bill); void main() { clrscr(); int bill; cout<<"Masukkan jumlsh bilangan : "; cin>>bill; bintangatas (bill); bintangbawah (bilk); getche(); }
2 Respostas
+ 5
Perhaps this may run:
#include <iostream>
//#include <conio.h>
// conio.h is no longer available
//#include <cstdio>
// Not required, as you did not
// use any function from cstdio.
#include <cstdlib> // For system.
// Better to comment these until you
// define them below :
//int bintangatas (int bil);
//int bintangbawah (int bill);
int main()
{
//clrscr(); is outdated. Use :
system("cls");
// Also, you don't need this in
// newer compilers, as the output
// is auto cleared for you before
// running the code.
int bill;
cout<<"Masukkan jumlsh bilangan : ";
cin>>bill;
//bintangatas (bill);
//bintangbawah (bill);
//getche(); //is outdated. Use :
cin.get(); // better to use this.
}
+ 2
Solved most of the problems, don’t know what clrscr(); is supposed to mean though.
#include <iostream> //no .h at end
#include <conio.h>
#include <cstdio> //stdio.h in C++
using namespace std; //need for cout, endl...
int bintangatas (int bil); //?
int bintangbawah (int bill); //?
int main() //int, not void
{
clrscr(); //still has error
int bill;
cout<<"Masukkan jumlsh bilangan : ";
cin>>bill;
bintangatas (bill);
bintangbawah (bill); //bilk meant to say bill?
getche();
return 0; //at the end of the program.
}