jara

11ove11beFri, 28 Nov 2008 03:35:03 +0000 28,2008

Filed under: Program 1 - Administrator @ 3:35 am

#include<stdio.h>

#include<conio.h>

#include <stdlib.h>

 

 

main(){

       float sales[20];

       float salary[20];

       int x;

       float per = .09;

       for(x=0 ;x<=20;x++){

            printf("Enter Sales in dollar(-1 to end): ");

            scanf("%f",&sales[x]);

            // for -1 input

            if(sales[x]== -1){

                             break;

            }

       salary[x] = sales[x] * per + 200;

       printf("Salary is: $%.2f\n\n\n\n",salary[x]);

       if(x >= 19 ){

                                    printf("Array Exceeded Exiting Program. . .");

                                    getch();

            }

       }

}

 

 

 

 

 

Comments »

The URI to TrackBack this entry is: http://jarah.blogsome.com/2008/11/28/6/trackback/

No comments yet.

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>



Anti-spam measure: please retype the above text into the box provided.

Get free blog up and running in minutes with Blogsome
Theme designed by Janis Joseph