-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Bobur Yusupov
committed
Jan 4, 2024
1 parent
028e470
commit 784c29f
Showing
30 changed files
with
458 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#include <iostream> | ||
|
||
int main() { | ||
int L; | ||
|
||
std::cin >> L; | ||
|
||
int meter = L / 100; | ||
std::cout << meter << std::endl; | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include <iostream> | ||
|
||
int main() { | ||
int number; | ||
|
||
std::cout << "Enter a three-digit number: "; | ||
std::cin >> number; | ||
|
||
const int HundredsPlace = number / 100; | ||
const int TensPlace = (number % 100) / 10; | ||
const int OnesPlace = number % 10; | ||
|
||
std::cout << "Ones place: " << OnesPlace << std::endl; | ||
std::cout << "Tens place: " << TensPlace << std::endl; | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include <iostream> | ||
|
||
int main() { | ||
int number; | ||
|
||
std::cout << "Enter a three-digit number: "; | ||
std::cin >> number; | ||
|
||
const int HundredsPlace = number / 100; | ||
const int TensPlace = (number % 100) / 10; | ||
const int OnesPlace = number % 10; | ||
|
||
std::cout << "Sum: " << OnesPlace + TensPlace + HundredsPlace << std::endl; | ||
std::cout << "Product: " << OnesPlace * TensPlace * HundredsPlace << std::endl; | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include <iostream> | ||
|
||
int main() { | ||
int number; | ||
|
||
std::cout << "Enter a three-digit number: "; | ||
std::cin >> number; | ||
|
||
const int HundredsPlace = number / 100; | ||
const int TensPlace = (number % 100) / 10; | ||
const int OnesPlace = number % 10; | ||
|
||
std::cout << OnesPlace * 100 + TensPlace * 10 + HundredsPlace << std::endl; | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include <iostream> | ||
|
||
int main() { | ||
int number; | ||
|
||
std::cout << "Enter a three-digit number: "; | ||
std::cin >> number; | ||
|
||
const int HundredsPlace = number / 100; | ||
const int TensPlace = (number % 100) / 10; | ||
const int OnesPlace = number % 10; | ||
|
||
std::cout << OnesPlace * 10 + TensPlace * 100 + HundredsPlace << std::endl; | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include <iostream> | ||
|
||
int main() { | ||
int number; | ||
|
||
std::cout << "Enter a three-digit number: "; | ||
std::cin >> number; | ||
|
||
const int HundredsPlace = number / 100; | ||
const int TensPlace = (number % 100) / 10; | ||
const int OnesPlace = number % 10; | ||
|
||
std::cout << OnesPlace * 100 + TensPlace + HundredsPlace * 10 << std::endl; | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include <iostream> | ||
|
||
int main() { | ||
int number; | ||
|
||
std::cout << "Enter a three-digit number: "; | ||
std::cin >> number; | ||
|
||
const int HundredsPlace = number / 100; | ||
const int TensPlace = (number % 100) / 10; | ||
const int OnesPlace = number % 10; | ||
|
||
std::cout << OnesPlace + TensPlace * 100 + HundredsPlace * 10 << std::endl; | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include <iostream> | ||
|
||
int main() { | ||
int number; | ||
|
||
std::cout << "Enter a three-digit number: "; | ||
std::cin >> number; | ||
|
||
const int HundredsPlace = number / 100; | ||
const int TensPlace = (number % 100) / 10; | ||
const int OnesPlace = number % 10; | ||
|
||
std::cout << OnesPlace * 10 + TensPlace + HundredsPlace * 100 << std::endl; | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include <iostream> | ||
|
||
int main() { | ||
int number; | ||
|
||
// Input an integer greater than 999 | ||
std::cout << "Enter an integer greater than 999: "; | ||
std::cin >> number; | ||
|
||
// Extract the hundreds digit using integer division and remainder | ||
int hundredsDigit = (number / 100) % 10; | ||
|
||
// Output the result | ||
std::cout << "Hundreds digit: " << hundredsDigit << std::endl; | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include <iostream> | ||
|
||
int main() { | ||
int number; | ||
|
||
// Input an integer greater than 999 | ||
std::cout << "Enter an integer greater than 999: "; | ||
std::cin >> number; | ||
|
||
// Extract the hundreds digit using integer division and remainder | ||
int hundredsDigit = (number / 1000) % 100; | ||
|
||
// Output the result | ||
std::cout << "Hundreds digit: " << hundredsDigit << std::endl; | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#include <iostream> | ||
|
||
int main() { | ||
int seconds; | ||
std::cin >> seconds; | ||
|
||
int minutes = seconds / 60; | ||
std::cout << minutes << std::endl; | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#include <iostream> | ||
|
||
int main() { | ||
int M; | ||
|
||
std::cin >> M; | ||
|
||
int ton = M / 1000; | ||
std::cout << ton << std::endl; | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#include <iostream> | ||
|
||
int main() { | ||
int seconds; | ||
std::cin >> seconds; | ||
|
||
int minutes = seconds / 3600; | ||
std::cout << minutes << std::endl; | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#include <iostream> | ||
|
||
int main() { | ||
int seconds; | ||
std::cin >> seconds; | ||
|
||
int passedSeconds = seconds % 60; | ||
std::cout << passedSeconds << std::endl; | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#include <iostream> | ||
|
||
int main() { | ||
int seconds; | ||
std::cin >> seconds; | ||
|
||
std::cout << seconds % 3600 << std::endl; | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#include <iostream> | ||
|
||
int main() { | ||
int seconds; | ||
std::cin >> seconds; | ||
|
||
std::cout << (seconds % 3600) / 60 << std::endl; | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#include <iostream> | ||
#include <map> | ||
|
||
int main() { | ||
std::map<int, std::string> Days; | ||
|
||
Days[0] = "Sunday"; | ||
Days[1] = "Monday"; | ||
Days[2] = "Tuesday"; | ||
Days[3] = "Wednesday"; | ||
Days[4] = "Thursday"; | ||
Days[5] = "Friday"; | ||
Days[6] = "Saturday"; | ||
|
||
int K; | ||
std::cin >> K; | ||
|
||
int dayIndex = K % 7; | ||
|
||
std::cout << Days[dayIndex] << std::endl; | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#include <iostream> | ||
#include <map> | ||
|
||
int main() { | ||
std::map<int, std::string> Days; | ||
|
||
Days[0] = "Sunday"; | ||
Days[1] = "Monday"; | ||
Days[2] = "Tuesday"; | ||
Days[3] = "Wednesday"; | ||
Days[4] = "Thursday"; | ||
Days[5] = "Friday"; | ||
Days[6] = "Saturday"; | ||
|
||
int K; | ||
std::cin >> K; | ||
|
||
int dayIndex = (K + 3) % 7; | ||
|
||
std::cout << Days[dayIndex] << std::endl; | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#include <iostream> | ||
#include <map> | ||
|
||
int main() { | ||
std::map<int, std::string> Days; | ||
|
||
Days[0] = "Sunday"; | ||
Days[1] = "Monday"; | ||
Days[2] = "Tuesday"; | ||
Days[3] = "Wednesday"; | ||
Days[4] = "Thursday"; | ||
Days[5] = "Friday"; | ||
Days[6] = "Saturday"; | ||
|
||
int K; | ||
std::cin >> K; | ||
|
||
int dayIndex = (K + 1) % 7; | ||
|
||
std::cout << Days[dayIndex] << std::endl; | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#include <iostream> | ||
#include <map> | ||
|
||
int main() { | ||
std::map<int, std::string> Days; | ||
|
||
Days[0] = "Sunday"; | ||
Days[1] = "Monday"; | ||
Days[2] = "Tuesday"; | ||
Days[3] = "Wednesday"; | ||
Days[4] = "Thursday"; | ||
Days[5] = "Friday"; | ||
Days[6] = "Saturday"; | ||
|
||
int K; | ||
std::cin >> K; | ||
|
||
int dayIndex = (K + 5) % 7; | ||
|
||
std::cout << Days[dayIndex] << std::endl; | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#include <iostream> | ||
#include <map> | ||
|
||
int main() { | ||
std::map<int, std::string> Days; | ||
|
||
Days[0] = "Sunday"; | ||
Days[1] = "Monday"; | ||
Days[2] = "Tuesday"; | ||
Days[3] = "Wednesday"; | ||
Days[4] = "Thursday"; | ||
Days[5] = "Friday"; | ||
Days[6] = "Saturday"; | ||
|
||
int K, N; | ||
std::cin >> K >> N; | ||
|
||
int dayIndex = (K + N - 2) % 7 + 1; | ||
|
||
std::cout << Days[dayIndex] << std::endl; | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#include <iostream> | ||
|
||
int main() { | ||
int A, B, C; | ||
|
||
std::cin >> A >> B >> C; | ||
|
||
int a_c = int(A / C); | ||
int b_c = int(B / C); | ||
|
||
std::cout << a_c * b_c; | ||
|
||
return 0; | ||
} |
Oops, something went wrong.