11 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for William_6

hello, I created a awk program to work witha data file to output a table and subtotal the rows and total up the collums and average I got it to work but when i added a presentation header before my totals go away. working code so far ------ can be …

Member Avatar for William_6
0
226
Member Avatar for milkman93

Hey Guys, I'm want to output a calculation to a JLabel. Example: double num1 = 14; double num2 = 3; double ans; ans = num1/num2; JLabel jl = new JLabel(); add(jl); jl.setText("The Answer is: " + ans); Currently the answer for this will be 4.666666667. Now if this was a …

Member Avatar for milkman93
0
5K
Member Avatar for DanOath

I am supposed to write a method to display a pattern as follows: ________1 _______21 ______321 _____4321 ____54321 ___654321 __7654321 _87654321 987654321 (underscores are simply placeholders to show alignment on my post they are not actually part of the printout) My program works and prints the aforementioned code correctly, however …

Member Avatar for zeroliken
0
398
Member Avatar for ineedsomehelp:3

[CODE]void alternate(char wordWord[][MAX],char wordVar[],int word[],int i,int j, int k, int l) { char ang[4],si[3],ni[3],ay[3],sa[3],kay[4]; int X,Y,Z1,Z2; strcpy(ang,"ang"); strcpy(si,"si"); strcpy(ni,"ni"); strcpy(ay,"ay"); strcpy(sa,"sa"); strcpy(kay,"kay"); tokenize(wordWord,wordVar,word,i,j,k,l); if(wordWord[j][k] == ang[4] || wordWord[j][k] == si[3]) X = wordWord[j][k]; else if(wordWord[j][k] == ni[3]) Z1 = wordWord[j][k]; else if(wordWord[j][k] == ay[3]) Y= wordWord[j][k]; else if(wordWord[j][k] == sa[3] …

Member Avatar for ineedsomehelp:3
0
329
Member Avatar for deluksic

Well... im making some kind of graphic engine for console in [B]c++[/B], ASCII based, just for exercise... anyways, i was wandering, can i print text [B]faster[/B]? Right now i'm printing the whole map of characters (pix[160][120]) in a [B]single line[/B], so it is fast, however i need it faster cause …

Member Avatar for deluksic
-1
2K
Member Avatar for ThomsonGB

//////////////////////////////////////////////////////////////////////////////////////// // In this little project I am trying to learn to get and manipulate data from // a file input using fstream strings I also wanted to use the formating available // with the printf and related string handling methods. I have a question in regards // to the …

Member Avatar for ThomsonGB
0
257
Member Avatar for Shodow

can u help me convert the cout to printf..i dont have a clue how.. tnx [CODE]#include<iostream.h> #include<string.h> #include<conio.h> int findSimilar(char[],char[]); void checkValue(int,int); int main(){ char boy[50]; char girl[50]; int similarInBoy=0; int similarInGirl=0; int total; clrscr(); cout<<"Enter Boy's Name: "; cin.getline(boy,50); cout<<"Enter Girl's Name: "; cin.getline(girl,50); similarInBoy=findSimilar(boy,girl); similarInGirl=findSimilar(girl,boy); total=similarInGirl+similarInBoy; cout<<"Boy: "<<similarInBoy<<","; …

Member Avatar for Narue
0
550
Member Avatar for hackit

i found a very simple program that is very simple but have a great logic. [CODE] #include<stdio.h> #include<conio.h> void main() { int B=1; printf("%d\n%d\n%d",b=15,b>9,b<9); getch(); } [/CODE] this seems very simple to me but the output is very strange to me OUTPUT:- 15 0 1 I tried very much to …

Member Avatar for Narue
0
151
Member Avatar for gynmd

hello, can someone explain me how this printf inside the function works? [CODE] #include<stdio.h> #define SIZE 10 void function(int [],int); int main() { int a[SIZE]={32,27,64,18,95,14,90,70,60,37}; function(a,SIZE); return 0; } void function(int b[],int size) { if(size>0){ function(&b[1],size-1); printf("%d ",b[0]); } } [/CODE]

Member Avatar for gynmd
0
171
Member Avatar for deepak_1706

I came across these to statements and i am not sure how they are parsed and the output given is produced... [CODE] printf("%d",printf("%d %d",5,5)&printf("%d %d",7,7)); [/CODE] o/p : 5 5 7 7 3 [CODE] printf(" %d %d",printf("%d %d",7,7),printf("%d %d",5,5)); [/CODE] o/p : 5 5 7 7 3 3 Could some …

Member Avatar for hyperion
0
154
Member Avatar for rjani1

Dear all, I am working on the code below: [CODE] int cookTime(int time) { int second, minute; for (minute = time; minute > -1; minute--) { for (second = 59; second > -1; second--) { sleep(1); printf ("%i", minute); printf (" : %i\n", second); } } } [/CODE] Now this …

Member Avatar for rjani1
0
1K

The End.