Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
barai_1
Language:
Ada
Assembly
Bash
C#
C++ (gcc)
C++ (clang)
C++ (vc++)
C (gcc)
C (clang)
C (vc)
Client Side
Clojure
Common Lisp
D
Elixir
Erlang
F#
Fortran
Go
Haskell
Java
Javascript
Kotlin
Lua
MySql
Node.js
Ocaml
Octave
Objective-C
Oracle
Pascal
Perl
Php
PostgreSQL
Prolog
Python
Python 3
R
Rust
Ruby
Scala
Scheme
Sql Server
Swift
Tcl
Visual Basic
Layout:
Vertical
Horizontal
/* * Program to evaluate face values. * Released under the Vegas Public License. * (c)2014 The College Blackjack Team. */ # include <stdio.h> # include <stdlib.h> int main() { char card_name [3]; puts ("card_name : "); scanf("%2s",card_name); int val= 0; if (card_name[0] == 'k') {val = 10;} else if (card_name[0] == 'q') {val = 10;} else if (card_name[0] == 'j') {val = 10;} else if (card_name[0] == 'a') {val = 11;} else {val = atoi(card_name);} printf ("card value is %i \n",val); return 0; }
g++
kolkata
Show compiler warnings
[
+
] Compiler args
[
-
]
Show input
Compilation time: 0.12 sec, absolute running time: 0.17 sec, cpu time: 0.11 sec, memory peak: 3 Mb, absolute service time: 0,38 sec
edit mode
|
history
|
discussion
card_name : card value is 10