Test Post
September 2, 2021
2 minutes
Balaji Kannan
Lorem ipsum dolor sit amet consectetur adipisicing elit. Assumenda magnam ad aspernatur molestiae cum nulla ab, repellat omnis impedit. Lorem ipsum dolor sit amet consectetur adipisicing elit. Et, culpa tempore ducimus magnam quibusdam architecto repellat suscipit facere esse fuga ullam eos! Cupiditate, tempora exercitationem. Lorem ipsum dolor sit amet consectetur adipisicing elit. Quasi voluptate vel porro a unde error ut, at excepturi mollitia quia eveniet earum eos aliquid hic, officia necessitatibus, harum fuga saepe! Lorem ipsum dolor sit amet consectetur adipisicing elit. Culpa, corporis architecto tenetur tempora sapiente aspernatur recusandae. Pariatur fuga sunt assumenda in sequi, hic minima! Totam beatae earum eveniet laudantium voluptate! Lorem ipsum dolor sit amet consectetur adipisicing elit. Tempore non ex, autem debitis recusandae officia laudantium a totam voluptatem expedita vitae unde enim nisi impedit deserunt hic quos, commodi suscipit! Lorem ipsum dolor sit amet consectetur adipisicing elit. Obcaecati quis expedita aut eos consequatur. Ad voluptatem explicabo amet dolorum saepe omnis corrupti natus id aperiam neque? Laborum voluptatibus itaque porro.
Blockquote
C++
1#include<bits/stdc++.h>23using namespace std;45int main() {6int n, ans = 0;7cin >> n;8// Sum of all inputs9for(int i = 0; i < n; ++i) {10int a;11cin >> a;12ans += a;13}14cout << ans << "\n";15}
Go
1package main23import "fmt"45func main() {6var n int7fmt.Print("Enter number : ")8fmt.Scan(&n)910if n == 1 {11fmt.Println(1)12} else if n == 2 {13fmt.Println(1, 1)14} else {15a := 116b := 117fmt.Print(1, 1, " ")18c := 019n -= 220for i := 0; i < n; i++ {21c = a + b22fmt.Print(c, " ")23a = b24b = c25}26}27}