int num1,num2,ans; int operation; void main(){ clrscr(); gotoxy(20,5); printf("W\tE\tL\tC\tO\tM\tE"); gotoxy(30,7);textcolor(WHITE);cprintf("Enter Number 1:"); scanf("%d",&num1); gotoxy(30,8);textcolor(WHITE);cprintf("Enter Number 2:"); scanf("%d",&num2); printf("\t\tA.) Addition \n"); printf("\t\tB.) Subtraction \n"); printf("\t\tC.) Multiplication \n"); printf("\t\tD.) Division \n"); printf(\n\t\t"Enter a Number above for the Operation: ",operation); scanf("%sd",&operation);
switch(operation) { case 'A': case 'a':
ans=num1+num2; gotoxy(30,16);textcolor(WHITE);cprintf("The Answer is: %d",ans); break;
case 'B': case 'b':
ans=num1-num2; gotoxy(30,16);textcolor(WHITE);cprintf("The Answer is: %d",ans); break;
case 'C': case 'c':
ans=num1*num2; gotoxy(30,16);textcolor(WHITE);cprintf("The Answer is: %d",ans); break;
case 'D': case 'd':
ans=num1/num2; gotoxy(30,16);textcolor(WHITE);cprintf("The Answer is: %d",ans); break;
printf("\t\t\tA U T O B I O G R A P H Y\n\n\n\n"); printf("\t\tHajimimashite! I'm Sybel Joy S. Norcos. "); printf("I'm 16 years of age and I live in Matina, Davao City. "); printf("Currently, I'm studying in the University of Mindanao "); printf("on the first year of my Computer Science course.\n"); printf("\t\tI have a kind mother whose name is Letty S. Norcos "); printf("and i have this caring father Ramil A. Maganase, "); printf("and I'm their only sibling. "); printf("I knew that you'll notice something's different there, just don't mind it. >^_^< "); printf("I'm happy that God gave me chance to live in this world, and also I'm thankful for "); printf("the one who is reading this little piece of my life...\n\n"); printf("God Bless You Always.");
void main() { clrscr(); float grade,average,sum; int a=0;
while(grade!=-1) { sum=sum+grade; printf("\n\n"); printf("\nEnter grade; -1 to exit"); scanf("%f",&grade);
if(grade==-1) {printf("\n\n\n\t\t\t"); printf("\n\t\t\tAverage is %.2f\n",average=sum/a);} a++; } if(average>=95 && average<=100){ printf("\n\nRated of this average: A");} else if(average>=90 && average<=94){ printf("\n\nRated of this average: B");} else if(average>=89 && average<=90){ printf("\n\nRated of this average: C");} getch(); }
Information Integrity in Pharma Industry
-
During administrative reviews, information uprightness is quite possibly
the most well-known issues. In certain cases, basic information is changed
or c...
Gradle
-
Gradle is a build automation system. It integrates with maven repository
for dependencies. It has its own DSL which is more concise than XML, for
writing y...
Exer2
-
#include
#include
void main()
{
clrscr();
gotoxy(10,7);
printf("I am Mae Juarez Cervantes. I am 17 years of age.\n I was born on
May 11, 1991 in the bea...
-
#include
#include
void main(){
clrscr();
int day;
printf("Enter an integer:");
scanf("%d",&day);
switch(day){
case 1:
printf("Sunday");
break;
case 2:
pri...
"My Experience in Prelim"
-
In my first day in prelim, i feel so nervous, because im shy of facing new
faces and affraid that i cannot meet friends..But it is verry exciting,
because ...