Sum of two number in c++ programming | c++ coding | programming in c++ language | cpp programming

2022 ж. 1 Там.
314 374 Рет қаралды

sum of two number in c++ programming language
c++ coding,
cpp coding

Пікірлер
  • Y bhtt intrsting h yrr m to ab shuru krri hu seekhna i am b com krliya h ab complete but man h to bs seekhna h ye bhi i hope easy rho

    @zee12592@zee12592Күн бұрын
  • You should use export inline template requires (Ty1 obj1, Ty2 obj2) { obj1 + obj2; } auto get_sum(const Ty1& obj1, const Ty2& obj2)->decltype(obj1 + obj2)noexcept(noexcept(obj1 + obj2)){ return obj1 + obj2; }

    @NysShortCut@NysShortCut6 ай бұрын
    • Not really.

      @toby9999@toby99996 ай бұрын
    • Try hard

      @naszemade@naszemade6 ай бұрын
    • True

      @wojtekdudek2374@wojtekdudek23746 ай бұрын
    • or just use double datatype

      @shahriarlabib000@shahriarlabib0005 ай бұрын
    • Why? If he wants to add two integers, then he will add two integers, no need for templates. Don't complicate things.

      @kinershah464@kinershah4644 ай бұрын
  • C : #include int main() { int x = 5; int y = 6; int sum = x + y; printf("%d, sum); return 0; } Output : 11

    @savitajoshi6834@savitajoshi6834Ай бұрын
  • How can I get 30s of my life back. Do it using pointers.

    @satvikkhare1844@satvikkhare18445 ай бұрын
  • Very helpful.. thank you so much 🙏

    @dikkuyadav9042@dikkuyadav9042 Жыл бұрын
  • Use correct initialization int a{}, etc.

    @virno69420@virno694203 ай бұрын
  • What about if you want the user to be able to enter more numbers for the sum without knowing how many numbers he will enter? Asking because that’s my homework for this week. Trying to figure out how to write a program for multiple numbers where as it outputs sum of even numbers, sum for odd numbers, and total sum.

    @djlystics@djlystics3 ай бұрын
    • Use the "for" loop. int n, x, s=0; cin >> n; for(int i=1; i> x; // this will be read n times s = s + x; // adds the current number to the sum } Let's say you have 4 numbers (3 7 9 18). i (from the for loop) will start out as 1, it will check if it's smaller then n (which in this case will be 4, cause we have 4 numbers) then it will execute what's inside the for loop. Then i will increase and so on. I'm guessing you know how to check if a number is odd or even using if statements.

      @TTony@TTony3 ай бұрын
  • @user-ql3hl2ne1t@user-ql3hl2ne1t2 ай бұрын
  • Fun to code

    @user-wl3bi6sv8k@user-wl3bi6sv8k6 ай бұрын
  • c++ k program kha pr bnte h

    @mahidahiya6008@mahidahiya60082 ай бұрын
  • Very easy

    @maliksami133@maliksami1337 ай бұрын
  • This music is a W

    @triazu4171@triazu41712 ай бұрын
  • Very help . For you thank you

    @user-zn4uq6cd5f@user-zn4uq6cd5f7 ай бұрын
  • in cout, remove the quotes where a+b so the numbers that you entered instead of letters will be output

    @MARKUS-mc5ez@MARKUS-mc5ez6 ай бұрын
  • Where is the enter button in the phone

    @user-hd4hx3ev4k@user-hd4hx3ev4k2 ай бұрын
  • Sup fellow coder that uses android to code 👊😊😊

    @joshnathanielarcilla6127@joshnathanielarcilla61278 ай бұрын
    • Bro wats up

      @kahumaisaac7699@kahumaisaac76998 ай бұрын
    • I need some help

      @kahumaisaac7699@kahumaisaac76998 ай бұрын
    • ​@@kahumaisaac7699why bro? Do you have any troubles in your code?

      @joshnathanielarcilla6127@joshnathanielarcilla61278 ай бұрын
    • what u need help with @@kahumaisaac7699

      @maneee4263@maneee42634 ай бұрын
    • I would genuinely rather walk on burning coal than code on mobile, no offense

      @dylanisaking@dylanisaking4 ай бұрын
  • Me it has failed

    @kahumaisaac7699@kahumaisaac76998 ай бұрын
  • what about the random sum?

    @schoolboy6706@schoolboy670611 күн бұрын
  • Thanks

    @digitalmachine0101@digitalmachine01016 ай бұрын
  • Lol, std::cout instead of using namespace std😅

    @Merovingien514@Merovingien5147 ай бұрын
    • It's not funny. Both are correct.

      @toby9999@toby99996 ай бұрын
    • @@toby9999 For a beginner programmer, yes, but in real projects, using namespace std can consume memory.

      @Merovingien514@Merovingien5146 ай бұрын
    • ​@@Merovingien514consume memory? I don't think so.

      @kinershah464@kinershah4644 ай бұрын
    • ​@@Merovingien514It doesn't require memory? The reason it's considered bad practice is because you're likely to get naming collision between functions. That's why they made std namespace.

      @virno69420@virno694203 ай бұрын
  • bro 1 error is generating

    @Aryanshiva-he5ec@Aryanshiva-he5ec6 ай бұрын
    • what error

      @ThatOneProFloppaTheBest@ThatOneProFloppaTheBest5 ай бұрын
    • Syntax error

      @___balls448@___balls448Ай бұрын
  • I was always doing cout no. 1; And then repeat with no. 2 but i see that i can just do cin >> a >> b;

    @Neonili@Neonili5 ай бұрын
  • But you can make it with "switch" and "case" or also "if" and "else"

    @Fvlyme@FvlymeАй бұрын
    • Isnt that Python?

      @___balls448@___balls448Ай бұрын
  • It would have been better if you wrote: cout

    @AadityaBhowmick@AadityaBhowmick Жыл бұрын
    • Nyc kia programming hwy apki well-done

      @RaoRawal786@RaoRawal7867 ай бұрын
    • it would be better to write cout

      @user-zx5xx4qu1h@user-zx5xx4qu1h7 ай бұрын
    • @@RaoRawal786 kyun yaar isme galat kya hai? main abhi bhi sikh raha hun class 8 mein hu mein

      @AadityaBhowmick@AadityaBhowmick7 ай бұрын
    • @@user-zx5xx4qu1h yeah that can be done either

      @AadityaBhowmick@AadityaBhowmick7 ай бұрын
  • can you make a video about x, and y

    @Do_ievenexist@Do_ievenexist2 ай бұрын
    • Yes we can by using pointers 👌🏻

      @dandn3907@dandn39072 ай бұрын
  • twenny one

    @talhamahmood6531@talhamahmood65317 ай бұрын
  • What name of the app

    @user-lu7ns3ys1n@user-lu7ns3ys1n5 ай бұрын
    • C++ bruh 😎😂😂😂😅😅

      @Sobhancraft@Sobhancraft3 ай бұрын
  • What apps do u use?

    @LilxianGAming@LilxianGAming2 ай бұрын
    • Dont knowi

      @sl3epyforever@sl3epyforever2 ай бұрын
    • Ok

      @LilxianGAming@LilxianGAming2 ай бұрын
  • Bro substraction

    @siyabbasha8859@siyabbasha88593 ай бұрын
  • 💀

    @filomek@filomek2 ай бұрын
  • 👍

    @softwaredynamicsolutions@softwaredynamicsolutions7 ай бұрын
  • How the battery Percentage increases while the program is runned 😂

    @milandangi2005@milandangi20053 ай бұрын
  • Bro in which app?

    @surendar4903@surendar49038 ай бұрын
    • C++

      @savitabhople2774@savitabhople27748 ай бұрын
    • ​@@savitabhople2774app?not

      @6ixty-Four@6ixty-Four7 ай бұрын
    • What are u doing here😂😂

      @user-is9rk1ol7g@user-is9rk1ol7g3 ай бұрын
    • No but which version

      @gamingwithadi4788@gamingwithadi47883 ай бұрын
    • I want to install but I can't this exact same

      @gamingwithadi4788@gamingwithadi47883 ай бұрын
  • jse c program turbo c or bnte h usi trha c++ kha bnte h

    @mahidahiya6008@mahidahiya60082 ай бұрын
    • C++ code b Turbo per run ho jata hai but try Dev C++, it is much better than Turbo.

      @fachoyt9686@fachoyt9686Ай бұрын
  • Ye kon sa app h bhai ?

    @kashishmanzoor120@kashishmanzoor120 Жыл бұрын
    • C++ coding❤

      @baisahmad3343@baisahmad3343 Жыл бұрын
    • @@baisahmad3343 thanks 👍

      @kashishmanzoor120@kashishmanzoor120 Жыл бұрын
    • vs code hi micro soft ka free

      @muhammadsuliman2456@muhammadsuliman2456 Жыл бұрын
    • Replit use karo

      @rorohitx@rorohitx11 ай бұрын
    • Online c++ compile

      @SoumyaDontula-yi5yt@SoumyaDontula-yi5yt9 ай бұрын
  • 11

    @shafiquekhan9331@shafiquekhan9331 Жыл бұрын
  • Using namespace std, declaring all your variables at the top of a scope block, and using a comma to declare multiple things on one line are all horrible practices in C++.

    @Mooproxy@Mooproxy6 ай бұрын
    • Says who? You?

      @toby9999@toby99996 ай бұрын
    • Why? xD

      @kacperek3594@kacperek35946 ай бұрын
    • Using namespace std is fine for such simple programs. Multiple declarations separated by comma is also fine, it's valid syntax.

      @kinershah464@kinershah4644 ай бұрын
  • very hard algorithm

    @_____2525@_____25256 ай бұрын
    • its the easiest one

      @firecandys@firecandys5 ай бұрын
  • Hi

    @gowrishx-darivazhagan3749@gowrishx-darivazhagan3749 Жыл бұрын
  • Wrong this code 😢

    @user-fx3tu1nw7v@user-fx3tu1nw7v2 ай бұрын
  • Error

    @rovinyadav4191@rovinyadav41916 ай бұрын
  • In C this program looks like this: #include int main() { int a, b, sum; printf("Enter two numbers: "); scanf("%d%d", &a, &b); sum = a + b; printf("a + b = %d", sum); return 0; }

    @TheTrueVoid861@TheTrueVoid8618 күн бұрын
  • Fun to code

    @Omimanono19@Omimanono196 ай бұрын
KZhead