Write a program to store the numbers 3 and 15. Find the product and display it.
Hint: Multiply numbers like this - a*b
#include <stdio.h>
int main(void) {
// WRITE YOUR CODE HERE
return 0;
}
#include <stdio.h>
int main(void) {
int number1 = 3;
int number2 = 15;
int product = 3 * 15;
printf("%d * %d = %d\n", number1, number2, product);
return 0;
}
Write a program to display the word “Butterfly”, and programmatically print the second letter of the word.
#include <stdio.h>
int main(void) {
// WRITE YOUR CODE HERE
return 0;
}
#include <stdio.h>
int main(void) {
char word[] = "Butterfly";
printf("The word is %s\n", word);
printf("The second letter is %c", word[1]);
return 0;
}
Write a program to print out the number 1 and the first letter of the alphabet. Then print out the number 2, and the second letter of the alphabet.