Search:

Type: Posts; User: mostafa faisal

Search: Search took 0.00 seconds.

  1. u can wrote it like this tag #include...

    u can wrote it like this
    tag
    #include<stdio.h>
    main()
    {
    FILE *o;
    o=fopen("in.txt","r");
    if((o=fopen("in.txt","r"))!=NULL)
    {
    int x;
  2. Replies
    23
    Views
    6,358

    while (digit = '\0') wrong XXXXXXXXXXXXXXX...

    while (digit = '\0') wrong XXXXXXXXXXXXXXX
    digit is an int. value and '\0' is a character so loop will be infinite , second u aren't comparing u are assigning values , i see that the condition...
  3. Replies
    8
    Views
    5,633

    sorry i forgot to write it it should be...

    sorry i forgot to write it
    it should be
    "printf("Enter %d no.:",i+1);"
    this is like a counter.
  4. Replies
    9
    Views
    1,157

    the condition depends on what u want???? where d...

    the condition depends on what u want????
    where d belongs is it ]-infinite,1.0] or ]-infinite,1.0[
    if u want the 1st one so ur cond. must be if(d<=1.0)
    and if u want the 2nd on the cond. must be...
  5. Replies
    8
    Views
    5,633

    i can see that the program u wrote is about a...

    i can see that the program u wrote is about a sorting for a variable length of an array so i'll write for u another code could be much easier to u:
    #include<stdio.h>
    #include<stdlib.h>
    void...
  6. Replies
    9
    Views
    2,426

    #include main() { int x,y; ...

    #include<stdio.h>
    main()
    {
    int x,y;
    printf("Enter two no.s to ADD:");
    scanf("%d%d",&x,&y);
    printf("\n%d",x+y);
    }
    this is what i understand from u
  7. Replies
    31
    Views
    16,458

    2nd fn. u can write it like this: int...

    2nd fn. u can write it like this:
    int sumAx(double x[][],int r)
    {
    int i;
    double sum=0;
    for(i=0,j=1;i<r;i++,j++)
    sum+=x[i][j]*j;
    return sum;
    }
    this will be much easier :D
  8. but this declaration : s.v =...

    but this declaration :
    s.v = malloc(sizeof(your_type) * s.n);
    malloc fn. return a void pointer so u have to make a cast type by writing
    s.v=(int *)malloc(sizeof(your_type) * s.n);
  9. Replies
    11
    Views
    2,147

    try this code: #include main() {...

    try this code:
    #include <stdio.h>
    main()

    {
    char ch;


    printf ("Enter a character: ");
    scanf ("%c", &ch);
Results 1 to 9 of 9