English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Programming & Design - October 2006

[Selected]: All categories Computers & Internet Programming & Design

means of data structure Linked list .By deatails i mean the posision of nodes...and i want it in c language

2006-10-27 07:01:46 · 1 answers · asked by s_waterlili 1

Sample Input

Dear Sally,

Please, please do it--1 would 4
Mary very, 1 much. And 4 6
8 everything in 5's power to make
14 pay off for you.

-- Thank 2 18 18--
0

Sample Output

Dear Sally,

Please, please do it--it would please
Mary very, very much. And Mary would
do everything in Mary's power to make
it pay off for you.
/*Uncompress*/
#include
#include
typedef struct listnode *ptr;
typedef struct listnode{
char word[50];
ptr link;
};
ptr creat(char *word){
ptr node;
node=malloc(sizeof(struct listnode));
strcpy(node->word,word);
node->link=NULL;
return node;
}
ptr insert(ptr list,char *word){
ptr node;
node=creat(word);
node->link=list;
return node;
}
inorder(ptr list,int n){
int i;
ptr phead,temp;

phead=list;
for(i=1;i temp=list;
list=list->link;
}
printf("%s",list->word);
if(n>1){
temp->link=list->link;
list=insert(phead,list->word);
}
return list;
}
int main()
{
int p=0,k=0,s=0,n=0;
char t,word[50];
ptr list;
list=creat(" ");

while(scanf("%c",&t)!=EOF && t!='0'){
if(isalpha(t)){word[p++]=t; printf("%c",t); s=1;}
else if(t>=48 && t<58){ k=1; n*=10; n+=t-48; }
else{
if(!k && s){word[p]='\0'; list=insert(list,word); p=0; s=0; printf("%c",t);}
else if(k){list=inorder(list,n);k=0... n=0; printf("%c",t);}
else printf("%c",t);
}
}

return 0;
}

2006-10-27 06:03:11 · 1 answers · asked by murtuzashareef2000 1

Below is my program code:

public class TestLagi
{
public static void main (String [] args)
{

Test myTest= new Test("what an ordinary world");

myTest.coba();








Here is my class code:
import java.util.Scanner;

public class Test
{

private String word;
private Scanner input;

public Test (String word)
{
word = "";
input = new Scanner(word);
}


public void coba()
{
while (input.hasNext())
{
String word = input.next();
System.out.println(word);
}



Iam trying to print several words on different line based on the string using the hasNext() method here, but why it wont work? Where did I make a mistake? I only can use the hasNext() and the next() method..

Thanks
System.out.println("failed");
}

}

}
}

2006-10-27 05:30:47 · 2 answers · asked by ? 1

hi friends plz help me, i try to control electrical devices from pc's parallel port by writting c program.but in the parallel port all ways a constant +5v presents.even i try to sent data to the parallel port by using c program,there is nothing happened.there is no mistake in c program.i am using windows xp wit service pack 2.plese help me ,how to eleminate this +5v ,from my port

2006-10-27 05:26:12 · 3 answers · asked by samimugam 1

For those who remember, this is the function I'm having problems with:

bool in_range(int val, int min, int max)
{
bool ans;
int nscores;
while ((val >= min) && (val <= max))
{
cout << "Please enter exam score " << nscores << " : ";
cin >> val;
if ((val < min) || (val > max))
{
int y = 1;
int n = 0;
cout << endl << "Score out of range!" << endl << endl;
cout << "Do you wish to re-enter score number " << nscores << " (y | n) : ";
cin >> ans;
if (ans == y)
return 1;
if (ans == n)
{
return 0;
}
}
nscores = nscores + 1;

}
}

This is the part that is giving me issues. I have the right variables set and all. If you need a more in-depth look as to what this is doing, please use this link:

http://www.cs.uwm.edu/~cs201/semester/assignment/06/06/06.html

The program is #12.

2006-10-27 04:45:46 · 5 answers · asked by Charlie 1

I wrote my own script and designed my myspace with it, I am just curious to know what people think of the overall design of my myspace page? What thoughts does it make you think, how does it make you feel? etc.

http://www.myspace.com/doomsdaypropaganda

2006-10-27 04:33:33 · 4 answers · asked by ? 1

I tried to do this in my class:

public void replaceWord(String app, String rep)
{
while (input.hasNext())
{
String word = input.next();
System.out.println(word);
}
}

but why doesn't it work??

I tried it with:


public int getNumberOfWords()
{
int n = 0;
while (input.hasNext())
{
String word = input.next();
n++;
}
return n;
}

and it works.

My purpose here is to print out every single word on my input

2006-10-27 04:18:52 · 2 answers · asked by ? 1

Is there a way that I can set the image attributes alt and title to the same value without just repeating the attribute? In order to get the mouseover effect to work with both ie and firefox I currently must duplicate the attributes.



Is there some way to assign both the alt and title attributes to the same value short of retyping the attribute description

2006-10-27 04:18:43 · 2 answers · asked by Interested Dude 7

Create the equivalents of a four-function calculator. The program should request the user to enter a number, an operator, and another number. (Use floating point). It should then carry out the specified arithmetical operation: adding, subtracting, multiplying, or dividing the two numbers. Use switch case statement to select the operation. Finally display the result.
When it finishes the calculation, the program should ask if the user wants to do another calculation. The response can be ‘y’ or ‘n’.
Sample Output
Some sample interaction with the program might look like this:

Enter first number, operator, second number: 10/3
Answer: 3.33333
Do another (y/n)?y
Enter first number, operator, second number: 12+100
Answer: 112
Do another (y/n)?n

2006-10-27 03:54:15 · 3 answers · asked by Muhammad A 1

Create a script called 'thisdir' that lists the directories those contain the files of specified size in the given directory (except the current directory). thisdir has two input arguments directory_path and size_of_file. It searches through the given directory and list the name of all its sub-directories, which contains any file equal to or greater than the size_of_file specified.

2006-10-27 03:47:43 · 3 answers · asked by iMaXX 4

How can I pull those menues of each software program on each computer so that i could have training sessions at home helping and teaching my friend everything on her lap top? I think it's called interactive training tools. But how do you do it?

2006-10-27 03:27:51 · 2 answers · asked by angelikabertrand64 5

#include
main()
{
int i,n,j;
cout<<"please enter number: ";
cin>>n;
for ( i = 1; i <= n; i++)
{
for ( j = 0; j < n - i + 2; j++)
cout<<(' ');
for ( j = 0; j < i; j++)
{
cout<<(i);
cout<<(' ');
}
cout<<"\n";
}
} code:
out put if enter 5 is
*****1
****2 2
***3 3 3
**4 4 4 4
*5 5 5 5 5
6 6 6 6 6 6
" * " are not part of output

2006-10-27 03:23:59 · 6 answers · asked by Muhammad A 1

I dunno how to explain this problem.

But right now, if i click to the Brush or dodge or burn, all i see is the cross hair. what happened to the good old circle.. i cant work without it :p

i kno it seems like a tiny problem, but i cant solve it !

thanks in advance

2006-10-27 03:22:25 · 4 answers · asked by Laugh-n-fart 3

Alert() stops the underlying javascript from continuing until the user clicks on the alert button. This stops a timer that I have on the main javascript which is no good for me. Is there anything that I can use that shows a message but does not stop the underlying script?

A window.open is no good if the end user has popups blocked.

2006-10-27 03:16:27 · 2 answers · asked by Jason W 1

While sql server is active, some related data folders are not allowed to be copied.

2006-10-27 02:38:47 · 4 answers · asked by x_squared 4

same time? i also want to keep my my yahoo page to come up with it and would like my my msn page to come up also, 4 tabd toatal i would like to automaticly go to and automaticly log me in every time. how do i make my thinkpad computer do this from now on? -serious answears only please. :)

2006-10-27 02:27:33 · 2 answers · asked by Anonymous

It could be Sun Java, if that matters. I have something when I open AOL that says Java in the top right corner of the opening page, but not Sun Java. Is that the same thing as Sun Java? Thanks for any info you can give me!!!

2006-10-27 02:27:01 · 2 answers · asked by OZzY MoTo 2

Some websites searched for in Google return the internal links within the site itself after the primary link, such as this result for the Fifie Council : http://www.google.com/search?q=fife.gov.uk

How is this done? Sitemap.xml? Meta tags?

Thanks In Advanced,

DosAngst

2006-10-27 02:25:41 · 1 answers · asked by dosangst 2

I Need a website that looks real liek a pro made it like in php
but under $600 that will let me sell my stuff on there or do what ever.

Any help would be great

2006-10-27 02:23:49 · 3 answers · asked by Anonymous

can't run my servlet and html that links them. when i run the servlet i get javax.servlet does not exist. if i try to run my html code that links the server, tomcat produces an error (servlet not found)

2006-10-27 02:20:30 · 1 answers · asked by Anonymous

to opera or fire fox, Is there any special way of doing this?

2006-10-27 02:18:53 · 4 answers · asked by jannyz55 2

Use" for" loops to construct a program that displays a pyramid of numbers on the screen.
The pyramid should look like this:

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

Ask the user to enter a digit(0-9) and display the pyramid with limit up to that number( as shown above).
#include
main()
{
int i,n,j;
cout<<"please enter number: ";
cin>>n;
for ( i = 1; i <= n; i++)
{
for ( j = 0; j < n - i + 2; j++)
cout<<(' ');
for ( j = 0; j < i; j++)
{
cout<<(i);
cout<<(' ');
}
cout<<"\n";
}
}

2006-10-27 02:09:10 · 2 answers · asked by Muhammad A 1

with the ln -s
command, the symbolic link has
rwxrwxrwx...
which seems like it's not a good idea.
any ideas why?

2006-10-27 02:08:13 · 2 answers · asked by Sufi 7

2006-10-27 02:08:05 · 2 answers · asked by Ondiek 1

i want to have my on home page.yeah i already know about myspace but i want my own page like dis www.mypagename.com somthing like so if you can help me please and thank you!

2006-10-27 01:56:46 · 5 answers · asked by say-say l 1

I want to know how to open an application file i.e files with a .exe (executable) extension. I want to view the source code of the application. I tried opening music files in wordpad, that is how i want to open an application file too. Any softwares that i could open it with? Please help Thanks

2006-10-27 01:39:30 · 3 answers · asked by Anonymous

I made my Webpage at tripod.com and I want to customize it by adding a comment box in its Home Page but I don't know how. Hope you can help me.Thanks!

-Chris

2006-10-27 01:35:09 · 2 answers · asked by caLviN 1

How do i put up an icon which would show up on the Address bar (just beside the address) when the site loads ??

Please check screen shot attached if required.
[http://img99.imageshack.us/img99/4990/askleotc9.jpg]

2006-10-27 01:21:04 · 2 answers · asked by T^X 2

since i am using computer from 5 to 6 years.i have good command over computers internet etc. now i want to start to learn programming from basic to advance. i dont have any knowledge of language fundamentals. i have seen VB 2005 i have designed some basic interfaces in it. but later i came to know that i must have good concept of OOPS or C or c++. few told me you cant learn VB2005 without learning vb 6 or Vb .net 2003. if i will start learning that it will take 6 or more months and than VB2005. its not look great for me. i dont want develop hardcore giant and multinetwork applications. i am planning to develop midrange of applications relating to inventory accounts etc. my question is
it is possible to learn directly VB 2005 or i have to learn vb 6 and more. guide me in this more suggetions also.

2006-10-27 01:10:12 · 3 answers · asked by Anonymous

fedest.com, questions and answers