Forum: C Oct 16th, 2006 |
| Replies: 13 Views: 9,261 im sorry guys if i make all of you confuse.... i want it to be round of in the function
because i'll use the returned value for another function
unsigned int CalculatePercentage(int TC,int PC){... |
Forum: C Oct 13th, 2006 |
| Replies: 13 Views: 9,261 okie thanks but how can i round it off to one deciamal place?
for example
(PartialComponent/TotalComponent)*100
90/235=38.3 %
38.3 should be the return value
anyone? i shouldnt be... |
Forum: C Oct 13th, 2006 |
| Replies: 13 Views: 9,261 how will i round off the return value to decimal place with tis function?
unsigned int CalculatePercentage(int TotalComponent, int PartialComponent){
return... |
Forum: C Oct 3rd, 2006 |
| Replies: 6 Views: 2,004 thankls it work :):cheesy: |
Forum: C Oct 2nd, 2006 |
| Replies: 6 Views: 2,004 int locate(nd **head,int num){
nd *p;
p=*head;
while(p!=NULL)
{
p=p->next;
}
if(num==p->x)
return 1;
else |
Forum: C Oct 2nd, 2006 |
| Replies: 6 Views: 2,004 actualy i dont know how to di this ...i tired you code it works :)
how about this one where i want to locate if the linked list is in the lis?
int locate(nd **head,int num){
nd *p;
... |
Forum: C Oct 2nd, 2006 |
| Replies: 6 Views: 2,004 i want to add all the inserted linked list by using this code
but what happens here if i input 15 then 35 =50 but when i input again 30 the sum is 50whats wrong with my code?
int sum(nd... |
Forum: C Oct 2nd, 2006 |
| Replies: 12 Views: 3,171 it works!!! i havent saved my code thtas why it didnt created new fle... i did exactly the code you gave me thanks!!!:cheesy: |
Forum: C Oct 2nd, 2006 |
| Replies: 12 Views: 3,171 none ....no error messgae displayed....when i run the exe... window screen is black then quits...
okie i'll try without the while loop |
Forum: C Oct 2nd, 2006 |
| Replies: 12 Views: 3,171 hello modt2.txt is not created...:sad: |
Forum: C Oct 2nd, 2006 |
| Replies: 12 Views: 3,171 it doesnt create a new file
with this code whats wrong?:
#include <stdio.h>
char spaceOcured;
void copyf(char *fname1, char *fname2){
FILE *fp1,*fp2;
int x;
spaceOcured=0; |
Forum: C Oct 2nd, 2006 |
| Replies: 12 Views: 3,171 i got it i initialize spaceOccured as char
char spaceOcured=0; |
Forum: C Oct 2nd, 2006 |
| Replies: 12 Views: 3,171 i have an error spaceOccured undefined symbol... |
Forum: C Oct 2nd, 2006 |
| Replies: 12 Views: 3,171 im sory the first txt file should have a content of "Have_ _ a nice day" two spaces then i have to save it to the 2nd file and should only have one spcae "Have_a nice day"... |
Forum: C Oct 1st, 2006 |
| Replies: 12 Views: 3,171 Can anyone help me...i have a file modt.txt and i want to save the content in modt2.txt but it seems my code is not working. Moreover,
if i have the content of the 1st file Have a nice day. i want... |
Forum: C Sep 2nd, 2006 |
| Replies: 3 Views: 1,302 |
Forum: C Sep 1st, 2006 |
| Replies: 3 Views: 1,302 Please help can you help me debug my code i cant display the result and the computation for sum is error...
help me please :sad:
#include <stdio.h>
int i,counter;
float sum;
struct... |