• Embed Doc
  • Readcast
  • Collections
  • CommentGo Back
Download
 
C Programs1
 /*
PR1
*/main(){clrscr();
 /* Clears the screen contents */ 
printf("We are three brothers: \n Shoni \n Cooki \n Mani");printf("\n There are two kinds of break Softbreak \n and \r Hardbreak");printf("\n Provide following \n name: \t class: \t roll no:");printf("\a");sleep(1);
 /* Stop the execution of program for given no of seconds */ 
printf("\n Did you hear a beep?");sleep(5);} /*
PR2
*/main(){clrscr();
 /* Clears the screen contents */ 
printf("\n\t My name is tanveer and i am %d years old: ",45);printf("\n\t Temperature in the core of the sun is %ld degree celcius:",41000000);printf("\n\t The value of the PI is %.4f ",3.1415);printf("\n\t The character %c is pronounced as \'SEE\': ",'c');printf("\n\t The character %c is pronounced as \'%s\' : ",'T',"TEE");printf("\n\t The data type LONG can store uupto %e unsigned value: ",4294967295);sleep(5);
 /* Stop the execution of program for given no of seconds */ 
}
Prepared by
Tanveer Ahmed 
2/11/091
 
C Programs2
 /*
PR3
*/main(){int x = 12, y = 6, z = 2;clrscr();
 /* Clears the screen contents */ 
printf("\n\t X = %d Y = %d Z = %d",x,y,z);printf("\n\n\t The Division of X and Y is %d",x/y);printf("\n\t The Product of X and Y is %d",x*y);printf("\n\t The Remainder of X divided by Z is %d",x%z);printf("\n\t The Addition of X and Y is %d",x+y);printf("\n\t The Subtraction of X and Y is %d",x-y);printf("\n\t An expression using more than one operators:");printf("\n\t X * Y + Z = %d",x*y+z);printf("\n\t Use of Parenthesis to change the priority of operators");printf("\n\t X * (Y + Z) = %d",x*(y+z));sleep(5);
 /* Stop the execution of program for given no of seconds */ 
}
Prepared by
Tanveer Ahmed 
2/11/092
 
C Programs3
 /*
PR4
*/main(){int x, y;clrscr();
 /* Clears the screen contents */ 
printf("\n\t Enter two integers and see their relationship\n\t");scanf("%d %d",&x,&y);if(x == y)printf("\n\t %d is equal to %d",x,y);if(x != y)printf("\n\t %d is not equal to %d",x,y);if(x < y)printf("\n\t %d is less than %d",x,y);if(x > y)printf("\n\t %d is greater than %d",x,y);if(x <= y)printf("\n\t %d is less than or equal to %d",x,y);if(x >= y)printf("\n\t %d is greater than or equal to %d",x,y);sleep(5);
 /* Stop the execution of program for given no of seconds */ 
}
Prepared by
Tanveer Ahmed 
2/11/093
of 00

Leave a Comment

You must be to leave a comment.
Submit
Characters: ...
You must be to leave a comment.
Submit
Characters: ...