mikelino's Profile User Rating: -----

Reputation: 1 Apprentice
Group:
Members
Active Posts:
25 (0.05 per day)
Joined:
03-November 12
Profile Views:
1,375
Last Active:
User is offline Mar 19 2014 05:32 AM
Currently:
Offline

Previous Fields

Dream Kudos:
0
Icon   mikelino has not set their status

Posts I've Made

  1. In Topic: where are my errors

    Posted 13 Mar 2013

    1)in line 39 & 40 you allocating 2 values inside meters
    2)i suggest you do like above, remove the {} for if-else start on line 44
    if (BMI< 18.50)
      printf("you are underweight");
    else if ((BMI< 16.00))
      printf("severe thinness\n");
    
    

    and also use
    if 
    else if 
    else if 
    else if
    else
    
    

    Don't keep repeat. start with if then else if and till last else.
    If that helps , give a reputation please.
  2. In Topic: how to declare int in my coding

    Posted 3 Mar 2013

    line 23 got 1 error.
    should be int main ()
    are you write it on your own and first time writing code?
    indent style and spacing important.
    want to declare a int variables is very easy.
    like:
    int main(){
    int i;
    int variables;
    
    

    Hope that helps.
    give me a reputation if that helps.
    LOL
  3. In Topic: Compare sum of 2 1D array

    Posted 24 Feb 2013

    Boss, can i ask a question?
    Besides helping people answer the coding how to get reputation?
    i shame on it 0 reputation but still a student :hammer:
    self also not expert onlt....
  4. In Topic: Compare sum of 2 1D array

    Posted 24 Feb 2013

    Sorry Boss.
    i get it right already.
    closed the thread.
    Sorry boss Jim.
    I know what went wrong already. :withstupid:
  5. In Topic: Compare sum of 2 1D array

    Posted 24 Feb 2013

    #include <stdio.h>
    #include <conio.h>
    #define N 10
    
    void readData(int x[]);
    int calculateSum(int x[]);
    void printLarger(int a[],int b[],int,int);
    
    main(){
        int a[N], b[N];
        int sumOfA, sumOfB;
    
        readData(a);
        readData(B)/>;
        sumOfA=calculateSum(a);
        sumOfB=calculateSum(B)/>;
        printLarger(a,b,sumOfA,sumOfB);
        getch();
        return 0;
        
    }
    
    void readData(int x[])
    {
        int i;
    
        printf("enter data items:\n");
        for (i = 0; i<N; i++) {
    	scanf("%d", &x[i]);
        }
        printf("the value entered are\n\t");
        for (i = 0; i<N; i++) {
    	printf("%d\t", x[i]);
        }
        print("\n");
    }
    
    int calculateSum(int x[]){
         int sum=0;
         int i;
         for (i=0; i<N; i++) {
    	    sum+= x[i];
    	}
    	return (sum);
    }
         
    void printLarger(int a[],int b[],int sumOfA,int sumOfB) {
         int i;
         
    	if (sumOfA > sumOfB)
    	    printf("array A is larger than array B");
         	for (i = 0; i < N; i++) {
                printf("%d\t",a[i]);
    		}
    	else if (sumOfA < sumOfB)
    		 printf {"array B is larger than array A");
           for (i = 0; i < N; i++) {
    			printf("%d \t",b[i]);
            }
    }
    
    
    
    

    the program say:" C:\Dev-Cpp\sem4.2.c In function `printLarger':
    55 C:\Dev-Cpp\sem4.2.c syntax error before "else" "
    help me Jim

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Private

Friends

Comments

mikelino has no profile comments yet. Why not say hello?