1. Shows the output for the following codes (10 points).
• Code1
printf("Get me %d
tickets
", 10);
printf("
****
");
• Code2
printf("Qty = %d
", 10);
printf("Price = %.2f
Total = %.2f
", 2.25, 22.50);
• Code3
printf("**** ******
");
printf("
*** **
");
• Code4
printf("***%c***
", ‘W’);
printf("%s***
", "TEST ");
1. แสดงผลลัพธ์สำหรับรหัสต่อไปนี้ (10 คะแนน) ได้.
•รหัส 1
printf ("ฉันได้รับ% d n ตั๋ว n", 10);
printf (" n n **** n");
• Code2
printf ("จำนวน =% d n", 10);
printf ("ราคา =% .2f n = รวม% .2f n", 2.25, 22.50);
• Code3
printf ("**** t ****** t n ");
printf (" n *** t ** n ");
• Code4
printf ("% *** *** ค n ", 'W' );
printf ("% s *** n", "ทดสอบ");
การแปล กรุณารอสักครู่..
