Thread: I need help :(

  1. #1
    Registered User
    Join Date
    Dec 2014
    Posts
    1

    Post I need help :(

    4.1 Write a program that will count from 1 to 12 and print the count, and its square, for each count.



    4.2 Write a program that counts from 1 to 12 and prints the count and its inversion to 5 decimal places for each count. This will require a floating point number.



    4.3 Write a program that will count from 1 to 100 and print only those values between 32 and 39, one to a line. Use the incrementing operator for this program.

  2. #2
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    O_o

    You need to do your own homework.

    As for getting assistance with homework, you'll have to show what you've tried or you'll be ignored.

    In before Salem posts a link to this guy posting same thing elsewhere?

    Soma
    “Salem Was Wrong!” -- Pedant Necromancer
    “Four isn't random!” -- Gibbering Mouther

  3. #3
    Registered User
    Join Date
    Dec 2014
    Location
    Mumbai, Maharashtra, India, India
    Posts
    14
    Dear ,Better to post some efforts you made ..We can Discuss Logic Development intead Code for you

  4. #4
    Registered User
    Join Date
    Jun 2011
    Posts
    4,513
    In before Salem posts a link to this guy posting same thing elsewhere?
    You mean like this?

    Please help me program in c language

  5. #5
    Registered User
    Join Date
    Dec 2014
    Posts
    8
    Q1.
    loop your program then create function to solve the dude.

  6. #6
    Registered User
    Join Date
    Dec 2014
    Posts
    8
    4.1 solution. try to understand my codes dude.
    Code:
    #include <stdio.h>
    int square(int n)
    {
    	int result=0;
    	result=n + ( (n+1) * n * (n-1) / 2 );
    	
    	return result;
    }
    main()
    {
    	int i=1;
    	
    	do{
    		printf("%d square %d\n",i,square(i));
    		i++;
    	}while(i<13);
    	return 0;
    }

Popular pages Recent additions subscribe to a feed

Tags for this Thread