Computer Science, asked by masterblaster40, 1 year ago

what will be the output of the following program if you input your age as 14 and
your friend's age as 16?
cls
input "What is your age",myage
input "What is your friend's age?",friendage
if myage = friendage then
Print "Hi! How are you?"
else
Print "Hello! Good morning."
end if​

Answers

Answered by gurukulamdivya
2

Answer:

#include<stdio.h>

int main()

{

  int myage, friendage;

   printf("What is your age \n");

   scanf("%d \n", &myage);

   printf("What is your friend's age \n");

   scanf("%d \n", &friendage);

   if(myage==friendage)

   printf("Hi! How are you?\n");

   else

   printf("Hello! Good morning.");

   return 0;

}

Similar questions