Featured

C.L.S.T.I.. Powered by Blogger.
Showing posts with label Conditions. Show all posts
Showing posts with label Conditions. Show all posts

0 Guess the Right Number

/*This program select the secret number for a */
/*corresponding message*/

#include<stdio.h>
main()
{
/*declaration of data types*/
int number1;

clrscr();

printf("This program will choose the selected number to ");
printf("sweetest word");
printf("\n Try to guess the number");
printf("\n Enter the number\n");
scanf("%d",&number1);

/*Condition*/
if (number1==143)
printf("I LOVE YOU..\n");
else
printf("Sorry.. try to guess another number.\n");
getche();
}
Read more

0 Get the largest number you enter

/*This letter will get the largest number you enter*/

#include<stdio.h>
main()
{
/*Declaration of data types*/
int number1, number2;
clrscr();
printf("This letter will get the largest number you enter");
printf("\nEnter your First number");
scanf("%d",&number1);
printf("\n Enter your Second number");
scanf("%d",&number2);

/*Condition*/
if (number1>=number2){
printf("\n Your First number is greatest than the second one: %d",number1);
}
else
printf("\n Your Second number is greatest than the First one: %d",number2);
getch();
}
Read more

Delete this element to display blogger navbar

 
© C.L.S.T.I. Tutorial | Design by Blog template in collaboration with Concert Tickets, and Menopause symptoms
Powered by Blogger