by CodeChum Admin
Whole numbers are great, but I think we should also pay attention to decimal numbers, too.
So, how about we make a program that involves a lot of decimals?
Instructions:
Input
1. A series of float numbers
Output
The first multiple lines containing message prompts for float numbers.
The last line contains the sum with 2 decimal places.
Enter a number: 1.1
Enter a number: 1.2
Enter a number: 1.3
Enter a number: 1.4
Enter a number: -1.0
Sum = 4.00
by CodeChum Admin
Looping numbers is fun, but it's even more exciting when we combine complex tasks to it, just like looping through a series of numbers and performing a series of code only to special numbers, like odd ones! And today, we're going to do just that.
Are you ready?
Instructions:
Input
1. An integer
Output
The first line will contain a message prompt to input the integer.
The succeeding lines contain the odd numbers.
Enter n: 10
9
7
5
3
1
by CodeChum Admin
Do you still know what being divisible by a certain number means? In case you forgot, being divisible means that the number is capable of being divided by another number without a remainder. With this knowledge, you can surely solve this problem!
Instructions:
Input
1. An integer
Output
The first line will contain a message prompt to input the integer.
The second line contains the appropriate message.
Enter n: 6
Divisible by 3
Enter n: 12
Divisible by 3 and 4
Enter n: 4
Divisible by 4
Instructions:
Input
1. First number
2. Operator
3. Second number
Output
The first line will contain a message prompt to input the first number.
The second line will contain a message prompt to input the operator.
The third line will contain a message prompt to input the second number.
The last line contains the result with 2 decimal places.
Enter the first number: 5
Select the operator (+, -, *, /): +
Enter the second number: 0.70
Result = 5.70
Can I get wedding game code in c programming it's urgent
Wedding Game
In a wedding that you are attending, there are some chairs that have digits inscribed at their
backs. The chairs are lined in a row such that they form a string of the digits. Find the
minimum number of sets M that can be formed from these digits such that:
1. The number of digits in each set is one gf more than one.
2. Each set is formed using consecutive digits and no digit can be used more than once.
3. In each set, the number formed using the digits is less than or equal to Y.
The placement season has begun in a college. There are N number of students standing outside an interview room in a line. It is given that a person who goes in first has higher chances of getting selected
The following is a two-dimensional character array of size 12X12 which represents a maze. The symbol ‘#’ represent a wall of the maze and the symbol ‘.’ represents a possible path. There is an entry point and exit point of the maze, which are denoted by a ‘.’ Write a C program which takes text file which contains the maze as command line argument and prints the minimum number of moves required to go from entry to exit. If there is no path from entry to exit display “-1”. You need to formulate the maze as a graph and use Breadth First Search to find shortest path from entry to exit. You can treat each cell as a vertex and if we can go from one cell to other cell with one move add edge between the corresponding vertices. For example, for the below maze:
############
. . . ##. ##. . .#
##. . . . . . . .##
#. .######. ##
####. . . . . . .#
# . . . .#. ###.#
###. . . . . . . .#
#. . .######. #
#####. . .#. .#
#. . .#. #. #. ##
#.#. . .#. . . . .
############
Min moves: 22
47:06
1 / Sample code to read input and write output
3- /"
4 #include <stdio.h>
6 int main() 7- (
char name[20]; scanf("%s" name);
printf("hello Ns", hame);
return 0;
77 Warning: Printing unwanted or-111-forestal dete to outati che th
#include<stdio.
Read Input from STOIN
19 int main()
20- ( 21 22 23 3
11 Write your code here return p
I
21°C Rain showe
Communication Technologies have influenced history. Even
now, ICT is playing a big role. To have a creative take on the topic, compose a poem inspired by
current issues, changes, or trends we are exposed to because of ICT. Write your poem on the
space provided.