CMPE102 PROGRAMMING FUNDAMENTALS
••• Laboratory Work # 4
Duration – 100 minutes
Experiment 1: (This Experiment will be done by assistant during lab hour
Read two, three digits integer numbers from input environment and show multiplication operation in the following format of output(Use format specification %4d ,%d5d,..etc..
Example: if num1 and num2 has 123 and 335 values, then multiplication output will be as follows.
123
335
x-------
615
369
369
+-------
40205
Experimen2 :This experiment will be prepared by the student will be garaded during lab hour by the assistant
Read the Names and birth years of three persons from input environment and display the name of the person whose age is in between the others.
Define the variables and input operation as follows and
char nameA[12], nameB[12], nameC[12];
int birthA, birthB, birthC;
printf(“Enter birth Year and name of the first person\n”);
scanf(“%d%s”,&birthA, &nameA);
printf(“Enter birth Year and name of the Second person\n”);
scanf(“%d%s”,&birthB, &nameB);
printf(“Enter birth Year and name of the third person\n”);
scanf(“%d%s”,&birthC, &nameC);
...
..
complete the rest of the program
Experimen3 :This experiment will be prepared by the student will be garaded during lab hour by the assistant
Read two integer numbers and a sign(operator)( + , - , * , / , ^ ) and do the necessary operations in between these integer numbers. Display the result in terms of numbers , operations and result.(^ will be used for power of first number)
(Example : if the given data is
3 12 *
then your program will produce the following result
3 and 12 is multiplied and obtained following result = 36 ) Lab Ödev,
2
●432
- 07-04-2010, 00:36:18Merhaba Arkdaslar ben denedim logic hatası alıyorum sizlerde bi bakarmsınız
hataları düzeltmen açısından yardımcı olabileyim...