Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
20171103_Digitos
#include <stdio.h> #include <stdlib.h> int main() { long long N; long long copiaN; short digito; printf("Valor de N ........ "); scanf(" %lld", &N); printf("Valor del digito... "); scanf(" %hd", &digito); copiaN = N; while(copiaN && copiaN % 10 != digito) { //copiaN = copiaN / 10; copiaN /= 10; } if(copiaN) { printf("SI\n\n");} else { printf("NO\n\n");} }
run
|
edit
|
history
|
help
0
strcat
Divisibility :- #simple-math #ad-hoc-1 #basics
Add c
loop
Calculating longs v0.5 finish b next lab
Struct
example of scanf and basic integer manipulation
Project 3 Part 1 v1.0
Program to input form command line and print it
Ascii contrasena segura