User Profile

Collapse

Profile Sidebar

Collapse
KhzQas
KhzQas
Last Activity: Nov 14 '06, 07:34 AM
Joined: Oct 15 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • KhzQas
    replied to Array problem in C Programming.
    in C
    Code:
    #include <stdio.h>
    
    int main(void)
    {
     int list[5];
     int i;
     int number;
     
     for (i = 0; i < 5; i++)
     {
      printf("Enter a number: ");
      scanf("%d", &number);
    
      list[i] = number;
      
     }
    return 0;
    }
    The above is the programming code that I have written to so far. I can not get to the 4th...
    See more | Go to post

    Leave a comment:


  • KhzQas
    started a topic Array problem in C Programming.
    in C

    Array problem in C Programming.

    1) Write a C program that declares an integer array with 5 elements.
    2) Inside a for() loop ask the user for a number and store it in the first element of the array (numerically the array is indexed from zero).
    3) Your loop will iterate 5 times and each time you get a number you will fill up the next spot in the list. After 5 pieces of data have been entered your array will be full.
    4) Write a second for() that looks at what...
    See more | Go to post

  • Yup it works out perfect....Than ks for the help.
    See more | Go to post

    Leave a comment:


  • The following is my solution for the C Programming problem above:
    Code:
    #include <stdio.h>
    
    int main(void)
    {
     int numeric_month;
    
     numeric_month = get_month();
    
     print_normal_month(numeric_month);
                    
     return 0;
    }
    
    get_month()
    {
     int month; 
    
      while (1)
       {
        printf("Month number (where
    ...
    See more | Go to post

    Leave a comment:


  • How to only limit numerical values in int for C Programming.

    1) Take a copy of the program below compile it and confirm it works for all numbers 1 - 12 input into the program.

    Code:
    #include <stdio.h>
    
    int main(void){
    
    	int month;
    	printf("Month number (where January is 1): ");
    	scanf("%d", &month);
    	if(month == 1){
    		puts("January");
    	}else if(month == 2){
    		puts("February");
    ...
    See more | Go to post

  • Start and End are initialized by the user with the getche() command. The 'i' value is intialized in the for loop.

    I ran the program and it worked for me alright. Just copy and paste it in notepad and run it in dos. Its a C program and not a C++ Program.
    See more | Go to post

    Leave a comment:


  • Need help in C Programming practice problem. Any voluntears?

    Hello mates.

    I am taking my very first programming language (C Programming) and as for practice purposes, I surf sites and try out to make programs. I am having problems with the following C Programming problem.

    1) You are required to use at least one for() loop to control the printing of a table in this lab.
    2) Do not use the scanf() function in this lab, use the getchar() instead.
    3) Your table will...
    See more | Go to post
No activity results to display
Show More
Working...