P33PHOLE HACKING NETWORK
Would you like to react to this message? Create an account in a few clicks or log in to continue.


A place where criminals and hackers hang out..
 
HomeHome  SearchSearch  Latest imagesLatest images  RegisterRegister  Log inLog in  

 

 assignment palat c prog.

Go down 
3 posters
AuthorMessage
JaVS_v2.5
Admin
JaVS_v2.5


Number of posts : 155
Age : 33
Localisation : vision homes seremban 2
Registration date : 2007-06-26

assignment palat c prog. Empty
PostSubject: assignment palat c prog.   assignment palat c prog. EmptySun Aug 22, 2010 2:52 am

Code:
submit b4:5pm, 2/9/2010, (hard copy)

q1:
write a program that reads a positive integer(n)
and then computer and prints the sum of all integers
betweek 1 and n.

q2:
write a program that reads positive floting point numbers
using repetition control-structure untill the user
terminates the program by entering zero. your program
should determine and print the smallest and
largest of the supplied numbers. please include appropriate
input validation in your program.

q3:
write a program that reads the exam marks for ten student
and print the number of passes and failures (mark more then 40 is
pass). display also the avarage, highest and lowest exam marks.

_________________________________________
Q1:
_________________________________________



#include <stdio.h>
void main(void)
{
   int counter=0,calc,sum=0;
   do{printf("Enter an integer: ");
   scanf("%d",&calc);
   if(calc < 0)
      printf("Invalid input!\n");}while(calc < 0);
   while(counter <= calc)
   {
      sum=sum+counter;
      counter++;
   }
   printf("The sum is: %d\n\n",sum);
}

_________________________________________
Q2:
_________________________________________


#include <stdio.h>
int main(void)
{
   float largest,smallest,input;

   do{printf("Insert float [Enter value='0' to quit]: ");
   scanf("%f",&input);
   largest = input;
   smallest = input;
   if(input < 0)
      printf("Invalid input!\n");
   if(input == 0)
      break;
   }while(input < 0);

   while(input != 0)
   {
   do{printf("Insert float [Enter value='0' to quit]: ");
   scanf("%f",&input);
   if(input < 0)
      printf("Invalid input!\n");
   }while(input < 0);
   if ( input > largest )
   {
        largest = input;
   }
   if (input < smallest && input != 0)
   {
   smallest = input;
   }
   }
   printf("\nThe largest float you entered is: %.2f\n\n",largest);
   printf("The smallest float you entered is: %.2f\n\n",smallest);

   return 0;
}



_________________________________________
Q3:
_________________________________________


#include <stdio.h>

int main(void)
{
   int counter=1,sumcounter=0,input,fail=0,pass=0,average,sum=0;
   int highest,lowest;
   printf("==============================\n");
   for(;sumcounter<1;)
   for(;counter<2;counter++)
      {
      do{printf("Enter student's [%02d] mark: ",counter);
      scanf("%d",&input);
      if(input < 0)
         printf("Invalid input! Value can't be Negative.\n");
      else if(input > 100)
         printf("Invalid input! Value can't Greater than 100.\n");
      }while(input < 0 || input > 100);
      highest=input;
      lowest=input;
      sum = sum + input;
      sumcounter++;
      if(input <= 40 && input >= 0)
         input=fail++;
      else if(input > 40 || input <= 100)
         input=pass++;
      }
   for(;sumcounter<10;)
   for(;counter<11;counter++)
      {
         do{printf("Enter student's [%02d] mark: ",counter);
         scanf("%d",&input);
         if(input < 0)
            printf("Invalid input! Value can't be Negative.\n");
         else if(input > 100)
            printf("Invalid input! Value can't be Greater than 100.\n");
         }while(input < 0 || input > 100);
         if(input > highest)
         {highest=input;}
         if(input < lowest)
         {lowest=input;}
         sum = sum + input;
         sumcounter++;
         if(input <= 40 && input >= 0)
            input=fail++;
         else if(input > 40 || input <= 100)
            input=pass++;
      }
   printf("==============================\n");
   printf("\t %02d student(s) Passed.\n\t %02d student(s) Failed.\n",pass,fail);
   average = sum / 10;
   printf("\t Average mark is: %d\n",average);
   printf("\t Highest mark is: %d\n",highest);
   printf("\t  Lowest mark is: %d\n",lowest);
   printf("==============================\n\n");

   return 0;
}


Assignment palat dah siap!!!woohoo cumshot hahaha
Back to top Go down
https://p33phole.forumotion.com
nazirulez
Recruit
nazirulez


Number of posts : 20
Localisation : 6th Hell
Registration date : 2007-09-25

assignment palat c prog. Empty
PostSubject: Re: assignment palat c prog.   assignment palat c prog. EmptyMon Aug 23, 2010 4:13 pm

wat da fukin hell iz dat??
Shocked
Back to top Go down
JaVS_v2.5
Admin
JaVS_v2.5


Number of posts : 155
Age : 33
Localisation : vision homes seremban 2
Registration date : 2007-06-26

assignment palat c prog. Empty
PostSubject: Re: assignment palat c prog.   assignment palat c prog. EmptyTue Aug 24, 2010 2:39 am

assignment aku yg palat hahaha.
da siap aku taruk kat forum ni wat backup
Back to top Go down
https://p33phole.forumotion.com
smoke_weat
BORON!!
smoke_weat


Number of posts : 183
Age : 32
Localisation : rising suns
Registration date : 2007-08-16

assignment palat c prog. Empty
PostSubject: Re: assignment palat c prog.   assignment palat c prog. EmptyWed Aug 25, 2010 3:00 pm

hhah....asal assingment palat lak???hahah Question pale @ lol!
Back to top Go down
smoke_weat
BORON!!
smoke_weat


Number of posts : 183
Age : 32
Localisation : rising suns
Registration date : 2007-08-16

assignment palat c prog. Empty
PostSubject: Re: assignment palat c prog.   assignment palat c prog. EmptyWed Aug 25, 2010 3:01 pm

assingment palat ke crunk?? drunken LOL!!! lol!
Back to top Go down
JaVS_v2.5
Admin
JaVS_v2.5


Number of posts : 155
Age : 33
Localisation : vision homes seremban 2
Registration date : 2007-06-26

assignment palat c prog. Empty
PostSubject: Re: assignment palat c prog.   assignment palat c prog. EmptyWed Aug 25, 2010 5:24 pm

Quote :
assingment palat ke crunk?? drunken LOL!!! lol!
crunky tamil club
Back to top Go down
https://p33phole.forumotion.com
smoke_weat
BORON!!
smoke_weat


Number of posts : 183
Age : 32
Localisation : rising suns
Registration date : 2007-08-16

assignment palat c prog. Empty
PostSubject: Re: assignment palat c prog.   assignment palat c prog. EmptyThu Aug 26, 2010 2:07 am

haha...nice gak tuh..ko join dierorg ke?? ko jadi ar pelapis mr.fuck dammit!!!! kene FUCK FROM THE BACK!!!! hakhak!!! cheers Basketball lol!
Back to top Go down
JaVS_v2.5
Admin
JaVS_v2.5


Number of posts : 155
Age : 33
Localisation : vision homes seremban 2
Registration date : 2007-06-26

assignment palat c prog. Empty
PostSubject: Re: assignment palat c prog.   assignment palat c prog. EmptyFri Aug 27, 2010 1:26 pm

...antara club yg established by mr fuck
Back to top Go down
https://p33phole.forumotion.com
smoke_weat
BORON!!
smoke_weat


Number of posts : 183
Age : 32
Localisation : rising suns
Registration date : 2007-08-16

assignment palat c prog. Empty
PostSubject: Re: assignment palat c prog.   assignment palat c prog. EmptyFri Aug 27, 2010 11:35 pm

hahahahaha!!!betul tuh..tau takpe.. cheers
Back to top Go down
smoke_weat
BORON!!
smoke_weat


Number of posts : 183
Age : 32
Localisation : rising suns
Registration date : 2007-08-16

assignment palat c prog. Empty
PostSubject: Re: assignment palat c prog.   assignment palat c prog. EmptyTue Feb 28, 2012 4:31 pm

aku skang pun kene wat coding gak!! eshol tul, aku blaja C# programming. babi!!!
cheers
Back to top Go down
JaVS_v2.5
Admin
JaVS_v2.5


Number of posts : 155
Age : 33
Localisation : vision homes seremban 2
Registration date : 2007-06-26

assignment palat c prog. Empty
PostSubject: Re: assignment palat c prog.   assignment palat c prog. EmptyThu Mar 01, 2012 1:05 pm

hahaha nice...nnti boley share knowledge dgn aku damnit!!
Back to top Go down
https://p33phole.forumotion.com
smoke_weat
BORON!!
smoke_weat


Number of posts : 183
Age : 32
Localisation : rising suns
Registration date : 2007-08-16

assignment palat c prog. Empty
PostSubject: Re: assignment palat c prog.   assignment palat c prog. EmptyWed Mar 14, 2012 9:03 am

boleh aje...aku ngah figure out camne nk nk infect satu server kolej aku..
ahahahah...Very Happy
cheers drunken
Back to top Go down
JaVS_v2.5
Admin
JaVS_v2.5


Number of posts : 155
Age : 33
Localisation : vision homes seremban 2
Registration date : 2007-06-26

assignment palat c prog. Empty
PostSubject: Re: assignment palat c prog.   assignment palat c prog. EmptyWed Mar 14, 2012 8:00 pm

cibai kia!
Back to top Go down
https://p33phole.forumotion.com
smoke_weat
BORON!!
smoke_weat


Number of posts : 183
Age : 32
Localisation : rising suns
Registration date : 2007-08-16

assignment palat c prog. Empty
PostSubject: Re: assignment palat c prog.   assignment palat c prog. EmptySat Mar 17, 2012 2:32 am

asal plak kia?? hahaha
Back to top Go down
Sponsored content





assignment palat c prog. Empty
PostSubject: Re: assignment palat c prog.   assignment palat c prog. Empty

Back to top Go down
 
assignment palat c prog.
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
P33PHOLE HACKING NETWORK :: Codes & Bugs archive-
Jump to: