A place where criminals and hackers hang out..
 
HomeHome  FAQFAQ  SearchSearch  RegisterRegister  MemberlistMemberlist  UsergroupsUsergroups  Log inLog in  

Share | 
 

 assignment palat c prog.

View previous topic View next topic Go down 
AuthorMessage
JaVS_v2.5
Admin
avatar

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

PostSubject: assignment palat c prog.   Sun 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

_________________
666 is the number of the BEAST :: dA :: quote; "dreaming of tits are just fucking awesome..."LOL..
Back to top Go down
View user profile http://p33phole.your-board.com
nazirulez
Recruit
avatar

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

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

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

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

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

assignment aku yg palat hahaha.
da siap aku taruk kat forum ni wat backup

_________________
666 is the number of the BEAST :: dA :: quote; "dreaming of tits are just fucking awesome..."LOL..
Back to top Go down
View user profile http://p33phole.your-board.com
smoke_weat
BORON!!
avatar

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

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

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

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

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

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

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

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

Quote :
assingment palat ke crunk?? drunken LOL!!! lol!
crunky tamil club

_________________
666 is the number of the BEAST :: dA :: quote; "dreaming of tits are just fucking awesome..."LOL..
Back to top Go down
View user profile http://p33phole.your-board.com
smoke_weat
BORON!!
avatar

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

PostSubject: Re: assignment palat c prog.   Thu 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
View user profile
JaVS_v2.5
Admin
avatar

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

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

...antara club yg established by mr fuck

_________________
666 is the number of the BEAST :: dA :: quote; "dreaming of tits are just fucking awesome..."LOL..
Back to top Go down
View user profile http://p33phole.your-board.com
smoke_weat
BORON!!
avatar

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

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

hahahahaha!!!betul tuh..tau takpe.. cheers
Back to top Go down
View user profile
smoke_weat
BORON!!
avatar

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

PostSubject: Re: assignment palat c prog.   Tue 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
View user profile
JaVS_v2.5
Admin
avatar

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

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

hahaha nice...nnti boley share knowledge dgn aku damnit!!

_________________
666 is the number of the BEAST :: dA :: quote; "dreaming of tits are just fucking awesome..."LOL..
Back to top Go down
View user profile http://p33phole.your-board.com
smoke_weat
BORON!!
avatar

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

PostSubject: Re: assignment palat c prog.   Wed 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
View user profile
JaVS_v2.5
Admin
avatar

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

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

cibai kia!

_________________
666 is the number of the BEAST :: dA :: quote; "dreaming of tits are just fucking awesome..."LOL..
Back to top Go down
View user profile http://p33phole.your-board.com
smoke_weat
BORON!!
avatar

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

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

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




PostSubject: Re: assignment palat c prog.   

Back to top Go down
 
assignment palat c prog.
View previous topic View next topic 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: