Problem 23

6 comments on “Problem 23”


  • 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);
    }


  • 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;
    }