- #include <iostream>
- using namespace std;
- int a, arr[10][10];
- int main() {
- cin >> a;
- for (int i = 0; i < a; i++) {
- for (int j = 0; j < a; j++) {
- if (i == 0) {
- arr[i][j] = 1;
- } else if (j == 0) {
- arr[i][j] = 1;
- } else {
- arr[i][j] = arr[i - 1][j] + arr[i][j - 1];
- }
- }
- }
- cout << arr[a - 1][a - 1];
- }
Saturday, April 25, 2020
509A Maximum in Table
Subscribe to:
Post Comments (Atom)
Aptitude test assistant programmer 2018
#include <stdio.h> #include <stdlib.h> int main() { char str[100]; int i; int space=0; printf("Enter a string\n")...
-
104A - Blackjack #include < bits / stdc ++. h > using namespace std ; int main (){ int n ; cin >> n ; int d = n - 10 ; ...
-
A. YES or YES? There is a string s � of length 3 3 , consisting of uppercase and lowercase English letters. Check if it is equal to &qu...
-
#include <iostream> using namespace std ; int main () { int n ; int q = 2 ; int c = 0 ; cin >> n ; if ( n % 2 == ...
No comments:
Post a Comment