# কোডটিকে সি প্লাস প্লাসে রূপান্তর করে দিতে পারবেন?

 0 ``````#include int main () { int num1, num2; printf("Enter a number = "); scanf("%d", &num1); printf("enter another number = "); scanf("%d", &num2); printf("%d + %d = %d\n", num1, num2, num1+num2); printf("%d - %d = %d\n", num1 , num2, num1-num2); printf("%d * %d = %d\n", num1, num2, num1*num2); printf("%d / %d = %d\n", num1, num2, num1/num2); return 0; } `````` asked 04 Nov '18, 22:13 Sanan 11●1

 1 হেডার ফাইলটি পরিবর্তন করলেই হবে। ``````#include int main () { int num1, num2; printf("Enter a number = "); scanf("%d", &num1); printf("enter another number = "); scanf("%d", &num2); printf("%d + %d = %d\n", num1, num2, num1+num2); printf("%d - %d = %d\n", num1 , num2, num1-num2); printf("%d * %d = %d\n", num1, num2, num1*num2); printf("%d / %d = %d\n", num1, num2, num1/num2); return 0; } `````` অথবা ``````#include using namespace std; int main () { int num1, num2; cout <<"Enter a number = "<>num1; cout <<"enter another number = "<>num2; cout << num1 <<" + "<< num2 <<" = "<< num1+num2 << endl; cout << num1 <<" - "<< num2 <<" = "<< num1-num2 << endl; cout << num1 <<" * "<< num2 <<" = "<< num1*num2 << endl; cout << num1 <<" / "<< num2 <<" = "<< num1/num2 << endl; return 0; } `````` Edit:Fixed answered 05 Nov '18, 00:18 Grinch 31●5 ভাই, "%d" টিকে বাদ দিয়ে কনভার্ট করা যায় না? (05 Nov '18, 17:14) Sanan অবশ্যই যায়। ``````.................................... cout << num1 << " / " << num2 << " = " << num1/num2 << endl; ................................... `````` দ্বিতীয় কোডটিতে @Grinch ভাই কিছু গণ্ডগোল করে ফেলেছে আরকি। (05 Nov '18, 19:23) Mosharraf Hosain ♦ আমি নোটিসই করিনি.thanks (06 Nov '18, 01:46) Grinch
 toggle preview community wiki:

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• 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

Question tags:

×416
×137

question asked: 04 Nov '18, 22:13

question was seen: 680 times

last updated: 06 Nov '18, 01:55