# 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("Fedruary \n");

printf("world cancer day \n");

printf("Darwin Day \n");

break;

case 3 :

printf("March \n");

printf("unplugged day \n");

printf("National Listener's Day \n");

break;

case 4 :

printf("April \n");

printf("Rainbow Search Day \n");

printf("national walking day \n");

break;

case 5 :

printf("May \n");

printf("labor day \n");

printf("world press freedom day \n");

break;

case 6 :

printf("June \n");

printf("international cat hug day \n");

printf("Day of drinking water \n");

break;

case 7 :

printf("July \n");

printf("american independence day \n");

printf("Truth telling day \n");

break;

case 8 :

printf("August \n");

printf("Village Headman's Day \n");

printf("Thai Women's Day \n");

break;

case 9 :

printf("September \n");

printf("non-formal education day \n");

printf("international ozone day \n");

break;

case 10 :

printf("October \n");

printf("International Day of Older Persons \n");

printf("world food day \n");

break;

case 11 :

printf("November \n");

printf("Disabled people's day \n");

printf("navy day \n");

break;

case 12 :

printf("December \n");

printf("Cookie Day \n");

printf("international human rights day \n");

break;

default :

printf("Error \n");

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

}

getch();

}

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

#include<conio.h>

int main()

{

float score;

float grade;

printf("Input Your Score : ");

scanf("%f",&score);

if (score>=80)

grade=4;

else if (score>=75)

grade=3.5;

else if (score>=70)

grade=3;

else if (score>=65)

grade=2.5;

else if (score>=60)

grade=2;

else if (score>=55)

grade=1.5;

else if (score>=50)

grade=1;

else

grade=0;

printf("Your's Score = %.2f \n",score);

printf("Grade = %.1f ",grade);

getch();

}

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

#include<conio.h>

int main()

{

float score;

char grade;

printf("Input Your Score : ");

scanf("%f",&score);

if (score>=80)

grade= 'A';

else if (score>=70)

grade='B';

else if (score>=60)

grade='C';

else if (score>=50)

grade='D';

else

grade='F';

printf("Your's Score = %.2f \n",score);

printf("Grade = %c ",grade);

getch();

}

# data[].attributes.headline
นางสาวธนัชพร วรรณพัฒน์ ม.5/5 เลขที่ 24

# data[].attributes.subject
นางสาวธนัชพร วรรณพัฒน์ ม.5/5 เลขที่ 24

# data[].attributes.body
ขนาด 50 W

ค่าไฟ 0.1995 Bah/hr

# 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.headline
นางสาวธนัชพร วรรณพัฒน์ ม.5/5 เลขที่ 24

# data[].attributes.subject
นางสาวธนัชพร วรรณพัฒน์ ม.5/5 เลขที่ 24

# 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 kilogram watt 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 เลขที่ 24

# data[].attributes.subject
นางสาวธนัชพร วรรณพัฒน์ ม.5/5 เลขที่ 24

# 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()

{

int i = 1;

float weight,sum = 0;

do

{

printf("Enter Weight :");

scanf("%f",&weight);

sum += weight;

i++;

}

while (i<=5);

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;

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()

{

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();
}