Question about Borland JBuilder X Enterprise (JXE0010USFVAAO)

1 Answer

C program 1) # define cube(x)(x*x*x) main() int x=2. y, z; y= cube(++x); z= ++y + 386 / cube(++x); printf("%d %d %d", ++x, y, z); 2) a = 0*aa b = a<<1 a) b=a b) b= 2a output is 1) 9,126,126 and 2)170 how and explain?

Posted by on

1 Answer

  • Level 1:

    An expert who has achieved level 1.

    Problem Solver:

    An expert who has answered 5 questions.

  • Contributor
  • 6 Answers

I can't understand what u have written.can u give in a more understandable way.

Posted on Nov 12, 2008

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
a 6ya expert can help you resolve that issue over the phone in a minute or two.
best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.
goodluck!

Posted on Jan 02, 2017

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

Hello... i need a program in c...... a calendar where you can save on a specific date a reminder...


#include <stdio.h>
#include <conio.h>
#include <math.h>
#include <iostream.h>
#include <fstream.h>


int getdaycode(int year)
{
return(year+(year-1)/4-(year-1)/100+(year-1)/400)%7;
}

int bool getleapcode(int year)
{
return year%4==0&&year%100!=0''year%400==0;
}


main()
{
clrscr();
int choice,month,days,day,daycode;
printf("\t\t\tSCHEDULER-CALENDAR PROGRAM\n\n\n");
printf("Please choosefrom the Menu:\n");
printf("\t1- Calendar Dislplay\n");
printf("\t2- Schedule Editor\n");
printf("\nChoice: ");
scanf("%d",&choice);

if(choice==1)
{
clrscr();
int year;
printf("\tCalendar Display\n\n");
printf("Type the YEAR to be Displayed: ");
scanf("%d",&year);
printf("\nYear = %d",year);

bool leapcode;

daycode=getdaycode(year);
leapcode=getleapcode(year);


for(month=1;month<=12;month++)
{
switch(month)
{
case 1:
{
printf("\nJanuary");
days=31;
}
break;

case 2:
{
printf("\n\nFebruary");
if(leapcode)
{
days=29;
}
else
{
days=28;
}
}
break;

case 3:
{
printf("\n\nMarch");
days=31;
}
break;

case 4:
{
printf("\n\nApril");
days=30;
}
break;

case 5:
{
printf("\n\nMay");
days=31;
}
break;

case 6:
{
printf("\n\nJune");
days=30;
}
break;

case 7:
{
printf("\n\nJuly");
days=31;
}
break;

case 8:
{
printf("\n\nAugust");
days=30;
}
break;

case 9:
{
printf("\n\nSeptember");
days=31;
}
break;

case 10:
{
printf("\n\nOctober");
days=30;
}
break;

case 11:
{
printf("\n\nNovember");
days=31;
}
break;

case 12:
{
printf("\n\nDecember");
days=30;
}
break;
}


printf("\n\nSun Mon Tue Wed Thu Fri Sat\n");

for(day=1;day<=daycode*5;day++)
{
printf(" ");
}
for(day=1;day<=days;day++)
{
printf(" %d ",day);

if((day+daycode)%7>0)
{
printf(" ");
}
daycode=(daycode+days)%7;
}

}



}
if(choice==2)
{
printf("Schedule Editor\n\n");
FILE *fptr1;
char filename1[]="sched.txt";
int reval=SUCCESS;

if((fptr1==fopen(filename1,"w"))
{
printf("File cannot be opened\n");
reval=FAIL;
}
else
{
CharReadWrite(fptr1);
fclose(fptr1);
}


int

getch();
return 0;
}

Sep 07, 2011 | Computers & Internet

1 Answer

I have problem in how to call the matrix using fuction


I don think u are in the right way to program the Matrix in C language, i found a lot of syntax error in your code, but nevermind i had correct it for u. Maybe still need a little correction for your own. Following code:

void matrix(int a[2][2],int b[2][2],int c[2][2]);
main()
{
int a[2][2]={{3,3},{4,4}};
int b[2][2]={{1,1},{2,2}};
int c[2][2]={0},i,j;
matrix(a,b,c);
printf("product of 2 matrix is");
for(i=0;i<2;i++)
{
for(j=0;j<2;j++)
printf(" %d",c[i][j]);
printf(" ");
}
}
void matrix(int a[2][2],int b[2][2],int c[2][2])
{
int row,col,sum1=0,sum2=0;
for(col=0;col<2;col++)
{
row=0;
sum1=(a[row][col]*b[row][col])+(a[row][col]*b[row+1][col]);
c[row][col]=sum1;
sum2=(a[row+1][col]*b[row][col])+(a[row+1][col]*b[row+1][col]);
c[row+1][col]=sum2;
}
}

Sep 10, 2009 | Intel Computers & Internet

1 Answer

How to make program of finfing the determinant of m*n matrix in C coding


I solve your problem but there is a little mistake that I can't find but maybe you can so here what I wrote:

#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
#include <dos.h>
#include <math.h>

#define n 3

typedef struct
{
double A[n][n];
int size;
}Matrix;

double det(Matrix mat);
Matrix cut(Matrix mat, int x);
int main(void)
{
clrscr();
double d;
Matrix mat;
mat.size=n;
mat.A[0][0]=1;
mat.A[0][1]=2;
mat.A[0][2]=3;
mat.A[1][0]=4;
mat.A[1][1]=4;
mat.A[1][2]=6;
mat.A[2][0]=7;
mat.A[2][1]=8;
mat.A[2][2]=9;

d=det(mat);
printf("%d",d);
getch();
return 0;
}
double det(Matrix mat)
{
double d=0;
if(mat.size>2)

for(int i=0;i<mat.size;i++)

d+=pow(-1,i)*mat.A[0][i]*det(cut(mat,i));

else

d=mat.A[0][0]*mat.A[1][1]-mat.A[0][1]*mat.A[1][0];

return d;
}
Matrix cut(Matrix mat, int x)
{
Matrix cutmat;
cutmat.size=mat.size-1;
for(int i=0;i<cutmat.size;i++)
for(int j=0;j<cutmat.size;j++)
if(j<x)
cutmat.A[i][j]=mat.A[i+1][j];
else
cutmat.A[i][j]=mat.A[i+1][j+1];
return cutmat;
}
Rate me if it helped!
And if you find the mistake please tell me where thanks.

Mar 06, 2009 | Intel Computers & Internet

5 Answers

Source code for stack using arrays in c++


stack in c using arrays
/* Program of stack using array*/
#include

Dec 05, 2008 | Computers & Internet

3 Answers

I need solve this type calulation is 0,1,1,2,3,5,8,13,21,34 etc. u send me the code of this type of calculation in c++ language


Ok! Here's a snippit from some code I wrote in beginning c++ classes. However, don't just cut and paste it. Know how it works since it's important in algorithm examination!

Just tested it, compiles and runs perfectly on GCC 4.0.1 on my mac, as well as my linux boxen. Windows may take some changes to output data.

/***********************************************
* Steven Parker
* Calculating Fib Sequence
* after two starting values, each number is the
* sum of the two preceding numbers
***********************************************/
#include <iostream>
using namespace std;

int main() {
int whentostop = 20; //How many values of sequence to calculate
int fib[whentostop]; //Hold fib numbers

for (int i=0; i < whentostop; i++) {
if (i == 0)
fib[0] = 0;
else if (i == 1)
fib[1] = 1;
else
fib[i] = fib[i-1] + fib[i-2];

cout << "Fibonacci[" << i << "]: " << fib[i] << endl;
}
return 0;
}

Nov 12, 2008 | Computers & Internet

1 Answer

Need code


Try the Following Five Programs

1) Program for Prime Number Generation

#include <stdio.h>
main()
{
int n,i=1,j,c;
clrscr();
printf("Enter Number Of Terms
");
printf("Prime Numbers Are Follwing
");
scanf("%d",&n);
while(i<=n)
{
c=0;
for(j=1;j<=i;j++)
{
if(i%j==0)
c++;
}
if(c==2)
printf("%d ",i)
i++;
}
getch();
}
--------------------------------------------------------------------------------------------------------------------------------------------------

2)Program for finding the prime numbers

#include <stdio.h>
#include <conio.h>
void main()
{
int n,m,k,i,max;
char c;
clrscr();
repeat: max=0;
k=2;
n=1;
printf("You want prime numbers upto:- ");
scanf("%d",&max);
printf("

");
for (i=1;i<=max;i++)
{
again: m=(n/k)*k;
if (m!=n)
k=k+1;
else
goto try1;
if (k < n/2)
goto again;
else
printf("%d",n);
printf(" ");
try1: n=n+1;
k=2;
}
fflush(stdin);
printf ("

Do you want to continue?(y/n):- ");
scanf("%c",&c);
if (c=='y')
goto repeat;
getch();

}
---------------------------------------------------------------------------------------------------------------------------------------------------

3)
  1. #include <stdio.h>
  2. int main(void) {
  3. int n,
  4. lcv,
  5. flag; /* flag initially is 1 and becomes 0 if we determine that n
  6. is not a prime */
  7. printf("Enter value of N > ");
  8. scanf("%d", &n);
  9. for (lcv=2, flag=1; lcv <= (n / 2); lcv++) {
  10. if ((n % lcv) == 0) {
  11. if (flag)
  12. printf("The non-trivial factors of %d are: \n", n);
  13. flag = 0;
  14. printf("\t%d\n", lcv);
  15. }
  16. }
  17. if (flag)
  18. printf("%d is prime\n", n);
  19. }
---------------------------------------------------------------------------------------------------------------------------------------------------

4)

#include<stdio.h>

#include<conio.h>

void main()

{

int n,i,c=0;

clrscr();

printf("enter the number:");

scanf("%d",&n);

for(i=1;i<=n;i++)

{

if(n%i==0)

{

c=c+1;

}

}

if(c==2)

printf("number is prime");

else

printf("number is not prime");

getch();

}
-------------------------------------------------------------------------

5)
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("enter the number:");
scanf("%d",&a);
for(b=2;b<a/2;b++)
{
if(n%i==0)
{
printf("\n Its not a Prime number");
c=1;
break;
}
if(flag==0)
printf("\n Its a Prime Number");
getch();
}
}


Sep 02, 2008 | Computers & Internet

1 Answer

How can multithreading be done on C Language... OR plz tell me... i want to make a programme in c... and when this program is run suppose * is falling from up to down but can i control the movement of...


What you need it's assembly language here example pixel move with arrows:

// I N C L U D E S ///////////////////////////////////////////////////////////

#include <dos.h>
#include <bios.h>
#include <stdio.h>
#include <math.h>
#include <conio.h>
#include <graphics.h>
#include <stdlib.h>

// D E F I N E S /////////////////////////////////////////////////////////////

#define KEYBOARD_INT 0x09
#define KEY_BUFFER 0x60
#define KEY_CONTROL 0x61
#define INT_CONTROL 0x20

// make and break codes for the arrow keys

#define MAKE_RIGHT 77
#define MAKE_LEFT 75
#define MAKE_UP 72
#define MAKE_DOWN 80

#define BREAK_RIGHT 205
#define BREAK_LEFT 203
#define BREAK_UP 200
#define BREAK_DOWN 208

// indices into arrow key state table

#define INDEX_UP 0
#define INDEX_DOWN 1
#define INDEX_RIGHT 2
#define INDEX_LEFT 3

// G L O B A L S /////////////////////////////////////////////////////////////

void (_interrupt _far *Old_Isr)(); // holds old com port interrupt handler

int raw_key; // the global raw keyboard data

int key_table[4] = {0,0,0,0}; // the arrow key state table

// F U N C T I O N S ////////////////////////////////////////////////////////

void _interrupt _far New_Key_Int()
{
asm{
sti
in al, KEY_BUFFER
xor ah,ah
mov raw_key, ax // I get scan code
in al, KEY_CONTROL
or al, 82h
out KEY_CONTROL,al
and al,7fh
out KEY_CONTROL,al
mov al,20h
out INT_CONTROL,al
} // end inline assembly

switch(raw_key) // process the key and update the table
{
case MAKE_UP: key_table[INDEX_UP] = 1; break;

case MAKE_DOWN: key_table[INDEX_DOWN] = 1; break;

case MAKE_RIGHT: key_table[INDEX_RIGHT] = 1; break;

case MAKE_LEFT: key_table[INDEX_LEFT] = 1; break;

case BREAK_UP: key_table[INDEX_UP] = 0; break;

case BREAK_DOWN: key_table[INDEX_DOWN] = 0; break;

case BREAK_RIGHT: key_table[INDEX_RIGHT] = 0; break;

case BREAK_LEFT: key_table[INDEX_LEFT] = 0; break;

} // end switch

} // end New_Key_Int

void setvideomode(void)
{
int gdriver = DETECT, gmode, errorcode;
initgraph(&gdriver, &gmode, "c:\\minc\\bgi");
errorcode = graphresult();

if (errorcode != grOk) /* an error occurred */
{
printf("Graphics error: %s\n", grapherrormsg(errorcode));
printf("Press any key to halt:");
getch();
exit(1); /* return with error code */
}

}

// M A I N ///////////////////////////////////////////////////////////////////

main()
{
int done=0,x=320,y=240; // exit flag and dot position

setvideomode();

Old_Isr = _dos_getvect(KEYBOARD_INT); // install our ISR

_dos_setvect(KEYBOARD_INT, New_Key_Int);

while(!done) // main event loop
{
if (key_table[INDEX_RIGHT]) x++;

if (key_table[INDEX_LEFT]) x--;

if (key_table[INDEX_UP]) y--;

if (key_table[INDEX_DOWN]) y++;

// draw the cyber dot
putpixel(x,y,15);
delay(10);

if (raw_key==1) // this is our exit key the make code for "esc" is 1.
done=1;

} // end while

_dos_setvect(KEYBOARD_INT, Old_Isr); // replace old ISR

closegraph();

return 0;
} // end main
Assembly is pretty hard language.
Rate me if it helped!

Aug 30, 2008 | Computers & Internet

2 Answers

C progarming language


i cannot write c program

Jun 24, 2008 | Computers & Internet

3 Answers

C programming coading


1
2 2
3 3 3
4 4 4 4
5 5 5 5 5

Apr 30, 2008 | Computers & Internet

Not finding what you are looking for?
Borland JBuilder X Enterprise (JXE0010USFVAAO) Logo

Related Topics:

120 people viewed this question

Ask a Question

Usually answered in minutes!

Top Borland Computers & Internet Experts

Tony

Level 3 Expert

2598 Answers

Yoav Shilon
Yoav Shilon

Level 2 Expert

104 Answers

k24674

Level 3 Expert

7993 Answers

Are you a Borland Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...