# data[].attributes.body
#include<stdio.h>

#include<conio.h>

int main()

{

int month;

printf("Enter Your Month : (1-12) ");

scanf("%d",&month);

switch (month)

{

case 1 :

printf("January \n");

printf("Happy New Year \n");

printf("Children’s Day \n");

break;

case 2 :

printf("Febuary \n");

printf("Chinese New Year’s Day \n");

printf("Valentine’s Day \n");

break;

case 3 :

printf("March \n");

printf("World Sleep Day \n");

printf("National Puppy Day \n");

break;

case 4 :

printf("April \n");

printf("National Siamese Cat Day \n");

printf("International Beaver Day \n");

break;

case 5 :

printf("May \n");

printf("International Harry Potter Day \n");

printf("World Press Freedom Day \n");

break;

case 6 :

printf("June \n");

printf("World Ocean Day \n");

printf("World Environment Day \n");

break;

case 7 :

printf("July \n");

printf("Tell the Truth Day \n");

printf("National Scout Day \n");

break;

case 8 :

printf("August \n");

printf("Mother's Day \n");

printf("National Science Day \n");

break;

case 9 :

printf("September \n");

printf("Corrado Feroci \n");

printf("National Youth Day \n");

break;

case 10 :

printf("October \n");

printf("World Teacher's Day \n");

printf("World Mental Health Day \n");

break;

case 11 :

printf("November \n");

printf("Loy Krathong Day \n");

printf("Royal Thai Navy Day \n");

break;

case 12 :

printf("December \n");

printf("Christmas Day \n");

printf("National Wildlife Protection Day \n");

break;

default :

printf("Error \n");

printf("Please enter Numer (1-12) only, Thank you \n");

}

getch();

}

# data[].attributes.headline
นางสาวนรินทร์ธร ศรีภูมิสวัสดิ์ ม.5/5 เลขที่17

# data[].attributes.subject
นางสาวนรินทร์ธร ศรีภูมิสวัสดิ์ ม.5/5 เลขที่17

# data[].attributes.body
ขนาด 286 w

ค่าไฟ 1 Beht/hr

# data[].attributes.headline
นางสาวนรินทร์ธร ศรีภูมิสวัสดิ์ ม.5/5 เลขที่17

# data[].attributes.subject
นางสาวนรินทร์ธร ศรีภูมิสวัสดิ์ ม.5/5 เลขที่17

# data[].attributes.body
#include <stdio.h>

#include <conio.h>

int main()

{

float rate = 0.0;

float consumption = 0.0;

float cost = 0.0;

printf("Electricity rate per kilowatt hour :");

scanf("%f", &rate);

printf("Amount of electricity used (kilowatt hour unit) : ");

scanf("%f",&consumption);

cost = rate * consumption;

printf("Electricity bill: %.2f THB\n", cost);

return 0;

}

# data[].attributes.body
#include <stdio.h>

#include <conio.h>
int main()    {
int Watt;
float Hours,Power,Unit,Payment;
printf("Program of Calculation your Electric\n");
printf("----------------------------------------------------------\n");
printf("Enter Watt:  ");
scanf ("%d",&Watt);
printf("Enter Hours:  ");
scanf("%f",&Hours);
Power = Watt*Hours;
Unit = Power/1000;
Payment = Unit*3.99;
printf("Your payment of electric is: %.4f\n",Payment);
getch();
}

# data[].attributes.headline
นางสาวนรินทร์ธร ศรีภูมิสวัสดิ์ ม.5/5 เลขที่17

# data[].attributes.subject
นางสาวนรินทร์ธร ศรีภูมิสวัสดิ์ ม.5/5 เลขที่17

# data[].attributes.body
#include<stdio.h>
#include<conio.h>
int main()
{
int points;
printf("How many points can you score?: ");
scanf("%d",&points);
if(points>=50){
printf("You have a score of more than 50\n");
printf("pass exam...Congretulations\n");
}
else
{
printf("Fail...Attempt again\n");
}
printf("Your score =  %d\n",points);
printf("Bye bye...see you again next semester \n");
getch();
return(0);
}

# data[].attributes.body
#include <stdio.h>
#include <conio.h>
int main()
{
for (int i = 1; i <= 10; i++) {
printf("%d\n", i);
}
return 0;
getch();
}

# data[].attributes.body
#include <stdio.h>
#include <conio.h>
int main()
{
for (int i = 1, j = 10; i < j; i++, j--) {
printf("i = %d, j= %d\n", i, j);
}
return 0;
getch();
}

# data[].attributes.body
#include<stdio.h>

#include<conio.h>

int main()

{

int sum = 1;

int fac, count = 1;

printf("Please enter number of factorial : ");

scanf("%d", &fac);

while (count<=fac)

{

sum = sum*count;

count = count + 1;

}

printf("Result of %d! is %d",fac,sum);

getch();

}

# data[].attributes.body
#include<stdio.h>
#include<conio.h>
int main()
{
int i = 1;
float weight,sum = 0;
while (i<=5)
{
printf("Enter Weight :");
scanf("%f",&weight);
sum += weight;
i++;
}
printf("Sum of Weights = %.2f\n",sum);
printf("Average of Weights = %.2f\n",sum/5);
getch();
}

# data[].attributes.body
#include<stdio.h>
#include<conio.h>
int main()
{
int i = 1;
float weight,sum = 0;
do
{
printf("Enter Weight :");
scanf("%f",&weight);
sum += weight;
i++;
}
while (i<=10);
printf("Sum of Weights = %.2f\n",sum);
printf("Average of Weights = %.2f\n",sum/5);
getch();
}