Problem 23

10 comments on “Problem 23”


  • amit

    #include

    int main()
    {
    int num;
    scanf(“%d”,&num);
    for(int i=1;i<9;i++)
    num=num+1;
    printf("%d",num);
    }


  • Sudarshan

    import java.util.Scanner;
    public class Multiply8 {
    public static void main(String args[]) {
    Scanner my = new Scanner(System.in);
    int n = my.nextInt();
    for(int i=0;i<3;i++) {
    n=n+n;
    }
    System.out.println(n);
    }

    }


  • Mohd Aquib

    #include
    void main()
    {
    int num, ans, n;
    ans = 0;
    n = 8;
    printf(“\n Enter Number : “);
    scanf(“%d”, &num);
    while(n!=0)
    {
    ans = ans+num;
    n–;
    }
    printf(“\n Answer : %d”, ans);
    }


  • Raman

    #include

    void main() {
    int n;
    int mul=0;
    scanf(“%d”,&n);
    for(int i=1;i<=8;i++){
    mul+=n;
    }
    printf("%d",mul);
    }


  • rohan

    #include
    int main()
    {
    int i,j,k=0;
    scanf(“%d”,&j);
    for(i=1;i<=8;i++)
    {
    k=j+k;
    }
    printf("%d",k);
    }


  • Chandra Chandu

    #include
    using namespace std;
    int main()
    {
    int final=0,i,j,n;
    cin>>n;
    for(i=1;i<=8;i++)
    {
    final=final+n;
    }
    cout<<final;
    }