You are not logged in. Please login at to post your questions!


Ciel and A-B problem (why my solution is wrong?)

include <iostream>

using namespace std; int main() { int A,B,p,q,dif; cin>>A >>B; dif=A-B; p=dif/10; if((dif%10)==9) q=(dif%10)-1; else q=(dif%10)+1; cout<<"\n"<<p<<q; return 0; }

asked 15 Jun '18, 19:42

ujjwalgupta303's gravatar image

accept rate: 0%

toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:


question asked: 15 Jun '18, 19:42

question was seen: 42 times

last updated: 15 Jun '18, 19:42