#include<stdio.h> int main() { int num1,num2,num3; printf("\nEnter value of num1,num2,num3:"); scanf("%d %d %d", &num1, &num2 ,&num3); if((num1>num2)&&(num1>num3)){ printf("The greatest number is num1\n"); } else if((num2>num3)&&(num2>num1)){ printf("The greatest number is num2\n"); }else{ printf("The greatest number is num3\n"); } return 0; } after that when you run this code into your Vs code terminal, you have to give some input to your program then press "Enter" and you will see the output in your terminal.
Objective Today, we're learning about Key-Value pair mappings using a Map or Dictionary data structure. Check out the Tutorial tab for learning materials and an instructional video! Task Given names and phone numbers, assemble a phone book that maps friends' names to their respective phone numbers. You will then be given an unknown number of names to query your phone book for. For each queried, print the associated entry from your phone book on a new line in the form name=phoneNumber ; if an entry for is not found, print Not found instead. Note: Your phone book should be a Dictionary/Map/HashMap data structure. Input Format The first line contains an integer, , denoting the number of entries in the phone book. Each of the subsequent lines describes an entry in the form of space-separated values on a single line. The first value is a friend's name, and the ...
#include<stdio.h> int main(int argc, char *argv[]) { int a, b; printf("Enter number a\n"); scanf("%d", &a); printf("Enter number b\n"); scanf("%d", &b); printf("The sum is %d\n", a+b); return 0; } Now give two integers as user input and press "Enter" and check the results. If you have any doubt comment down below.
Comments
Post a Comment