oh but if like that then my code don't have array.. using array is one of the requirement of the question..
Q:* the accountant is able to type in the entire daily sales ammount into the program
...
Type: Posts; User: archriku
oh but if like that then my code don't have array.. using array is one of the requirement of the question..
Q:* the accountant is able to type in the entire daily sales ammount into the program
...
so where i modified the code?i dont really understand by sentence.. can u point where should i modified?
but then this will come out in exam said by my teacher..
*formula = average = day 1 sales+......+ day n sales / n
#include<stdio.h>
main(void)
{
int days = 0,count;
float x[unknown size], average, sum;
printf("how many days?");
scanf("%d", &days);
for ( count = 0; count < days; count++) {
how do i change the fuction below using pointer method to return back the value of x and y?
void exchange(int x,int y)
{
int temp;
temp = x;
x = y;
y = temp;
return ;
oh okey thx i get it already=]
can u help me with swapping?http://cboard.cprogramming.com/c-programming/115644-printing-backward.html#post860497 thx
#
include<stdio.h>
void swap(int i,int j)
{
int t; //eg. t = number[0] = 3
t = i; number[0] = number [4] = 1
i = j; number[4] = t = 3 //
j = t;
}
if this? (false || true) && false
yes i haven learn the swap fuction.. so do i really need to use swap?this question maybe come out in exam.. i really need to know how to do it.. pls help me
can u show me an example of return a false value?
#include<stdio.h>
void swap(int *i,int*j)
{
int t;
t = i;
i = j;
j = t;
}
i dont have the correct answer.. i choose Q1 B Q2a.. plz explain Q1 for me thx
how to i swap the value?i cant change the int num
yes i know... but i have no idea how the code already... u know how ?
Q1.Which 1 will return a false value?
a) true && true || false
b) false || true
c) (false || true) && true
d) (false || true) || true
Q2.what is a post test loop?
i given a question:
write a sample code to reverse the content to 12543
{
int num[5] = {3,4,6,2,1};
ADD YOUR SAMPLE CODE HERE
ic.. so how do i set the %29[^\n] to infinite length?
#include<stdio.h>
#include<string.h>
void readinput(int i);
void writeoutput(int i);
typedef struct {
char name[80];
char matrix[80];
int age;
thx Change the format string of your "%s" to "%29[^\n] <-- this thing works..
btw can u tell me why i cant put %s? izzit %s a string?
#include<stdio.h>
void readinput(int i);
void writeoutput(int i);
typedef struct {
char matrix[30];
char name[30];
int age;
char sex[4];
quick question something about array..
when i put name[30].. what it actually means?the 30.. izzit i can have 31 character inside it?.. if so when i type name like name: john ian something then...
-other tread-
okey thx alot i found out my problem d.. thx bracket wasted my time=[
plz state out my problem can?i cant find it thats y i post it up here..